[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))))
- [nongnu] elpa/subed 909cffd 216/389: Use generic function subed-subtitle-text in test-subed.el, (continued)
- [nongnu] elpa/subed 909cffd 216/389: Use generic function subed-subtitle-text in test-subed.el, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 1654a08 207/389: Properly indent tests, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 3bab6b7 196/389: Use subed-mpv-socket-dir for subed-mpv--socket, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 08e9762 188/389: Add option to ignore negative duration when adjusting start/stop time, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 06aa155 187/389: Remove debugging messages from tests, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 8bebab8 199/389: Report error when mpv socket file already exists, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed fbadab7 198/389: Add function subed--buffer-file-name, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed cd972bd 191/389: (not ...) instead of (eq ... nil), ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 1821ccd 190/389: (not ...) instead of (eq ... nil), ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 37545d9 201/389: Call subed-mpv-kill when Emacs exits, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed fafff02 221/389: subed-srt--jump-to-subtitle-id: Remove useless progn,
ELPA Syncer <=
- [nongnu] elpa/subed dbc8394 222/389: Prevent extra goto-char when jumping to specific subtitle ID, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 7e2fe58 230/389: lint guards, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 77c206e 237/389: Remove redundant jumps, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 29652a4 239/389: Add subed-insert-subtitle-adjacent, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 422981e 240/389: Fix typos in tests, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 67d6253 241/389: Add more tests for subtitle insertion, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 1342294 242/389: Add more tests for inserting subtitles adjacent, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed ee0e3eb 243/389: subed-insert-subtitle-adjacent: Maybe use reduced subtitle spacing, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 1ef2dbb 245/389: Add more tests for inserting subtitles adjacent with restricted space, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 239deaf 246/389: subed-copy-player-pos-to-start/stop-time: Use generic functions, ELPA Syncer, 2021/12/03