emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/subed fafff02 221/389: subed-srt--jump-to-subtitle-id: Rem


From: ELPA Syncer
Subject: [nongnu] elpa/subed fafff02 221/389: subed-srt--jump-to-subtitle-id: Remove useless progn
Date: Fri, 3 Dec 2021 11:00:30 -0500 (EST)

branch: elpa/subed
commit fafff02ae66423bb3571c7ad7fd85cfa689a0fc5
Author: Random User <rndusr@posteo.de>
Commit: Random User <rndusr@posteo.de>

    subed-srt--jump-to-subtitle-id: Remove useless progn
---
 subed/subed-srt.el | 34 ++++++++++++++++------------------
 1 file changed, 16 insertions(+), 18 deletions(-)

diff --git a/subed/subed-srt.el b/subed/subed-srt.el
index dfdf6ce..acc90f7 100644
--- a/subed/subed-srt.el
+++ b/subed/subed-srt.el
@@ -149,25 +149,23 @@ Return point or nil if no subtitle ID could be found."
   (interactive)
   (save-match-data
     (if sub-id
-        (progn
-          ;; Look for a line that contains only the ID, preceded by one or more
-          ;; blank lines or the beginning of the buffer.
-          (let* ((orig-point (point))
-                 (regex (format "\\(%s\\|\\`\\)\\(%d\\)$" 
subed-srt--regexp-separator sub-id))
-                 (match-found (progn (goto-char (point-min))
-                                     (re-search-forward regex nil t))))
-            (goto-char orig-point)
-            (when match-found
-              (goto-char (match-beginning 3)))))
-      (progn
-        ;; Find one or more blank lines.
-        (re-search-forward "\\([[:blank:]]*\n\\)+" nil t)
-        ;; Find two or more blank lines or the beginning of the buffer, 
followed
-        ;; by line composed of only digits.
-        (let* ((regex (concat "\\(" subed-srt--regexp-separator 
"\\|\\`\\)\\([0-9]+\\)$"))
-               (match-found (re-search-backward regex nil t)))
+        ;; Look for a line that contains only the ID, preceded by one or more
+        ;; blank lines or the beginning of the buffer.
+        (let* ((orig-point (point))
+               (regex (format "\\(%s\\|\\`\\)\\(%d\\)$" 
subed-srt--regexp-separator sub-id))
+               (match-found (progn (goto-char (point-min))
+                                   (re-search-forward regex nil t))))
+          (goto-char orig-point)
           (when match-found
-            (goto-char (match-beginning 3))))))
+            (goto-char (match-beginning 3))))
+      ;; Find one or more blank lines.
+      (re-search-forward "\\([[:blank:]]*\n\\)+" nil t)
+      ;; Find two or more blank lines or the beginning of the buffer, followed
+      ;; by line composed of only digits.
+      (let* ((regex (concat "\\(" subed-srt--regexp-separator 
"\\|\\`\\)\\([0-9]+\\)$"))
+             (match-found (re-search-backward regex nil t)))
+        (when match-found
+          (goto-char (match-beginning 3)))))
     ;; Make extra sure we're on an ID, return nil if we're not
     (when (looking-at "^\\([0-9]+\\)$")
       (point))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]