[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/subed 430ba0334f 4/9: subed-for-each-subtitle: handle WebV
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/subed 430ba0334f 4/9: subed-for-each-subtitle: handle WebVTT header |
Date: |
Sat, 25 Nov 2023 16:00:54 -0500 (EST) |
branch: elpa/subed
commit 430ba0334fe601bdeeaad77626947c9b11fe3a50
Author: Sacha Chua <sacha@sachachua.com>
Commit: Sacha Chua <sacha@sachachua.com>
subed-for-each-subtitle: handle WebVTT header
* subed/subed-common.el (subed-for-each-subtitle): Don't get confused
by the WebVTT header. Allow edebugging.
---
subed/subed-common.el | 23 +++++++++++++----------
1 file changed, 13 insertions(+), 10 deletions(-)
diff --git a/subed/subed-common.el b/subed/subed-common.el
index cd5494c7d9..5a81703603 100644
--- a/subed/subed-common.el
+++ b/subed/subed-common.el
@@ -109,7 +109,8 @@ If END is nil, it defaults to `point-max'.
If BEG and END are both nil, run BODY only on the subtitle at point.
If REVERSE is non-nil, start on the subtitle at END and move backwards.
Before BODY is run, point is placed on the subtitle's ID."
- (declare (indent defun))
+ (declare (indent defun)
+ (debug 1))
`(atomic-change-group
(if (not ,beg)
;; Run body on subtitle at point
@@ -134,15 +135,17 @@ Before BODY is run, point is placed on the subtitle's ID."
(unless (subed-backward-subtitle-id)
(throw 'first-subtitle-reached t)))))
;; Iterate forwards
- (save-excursion (goto-char begm)
- (subed-jump-to-subtitle-id)
- (catch 'last-subtitle-reached
- (while t
- (when (> (point) endm)
- (throw 'last-subtitle-reached t))
- (progn ,@body)
- (unless (subed-forward-subtitle-id)
- (throw 'last-subtitle-reached t))))))))))
+ (save-excursion
+ (goto-char begm)
+ (unless (subed-jump-to-subtitle-id)
+ (subed-forward-subtitle-id))
+ (catch 'last-subtitle-reached
+ (while t
+ (when (> (point) endm)
+ (throw 'last-subtitle-reached t))
+ (progn ,@body)
+ (unless (subed-forward-subtitle-id)
+ (throw 'last-subtitle-reached t))))))))))
(defmacro subed-with-subtitle-replay-disabled (&rest body)
"Run BODY while automatic subtitle replay is disabled."
- [nongnu] elpa/subed updated (c9e3ec9963 -> 774e5b3f07), ELPA Syncer, 2023/11/25
- [nongnu] elpa/subed b1ad383ea8 5/9: subed-vtt: iterating shouldn't get confused by blank lines at end, ELPA Syncer, 2023/11/25
- [nongnu] elpa/subed a66d2206ee 6/9: New command subed-wpm calculates words per minute, ELPA Syncer, 2023/11/25
- [nongnu] elpa/subed 774e5b3f07 9/9: subed-vtt: Handle subtitles with short timestamps and comments, ELPA Syncer, 2023/11/25
- [nongnu] elpa/subed 6812364955 1/9: test-subed-common.el: Clean up duplicated sexps, ELPA Syncer, 2023/11/25
- [nongnu] elpa/subed 63bd6a83a4 2/9: Add tests, ELPA Syncer, 2023/11/25
- [nongnu] elpa/subed 10b85e48a0 7/9: subed-vtt: Improve ID and comment handling, ELPA Syncer, 2023/11/25
- [nongnu] elpa/subed cea86bccd0 3/9: New hook: subed-subtitle-merged-hook, ELPA Syncer, 2023/11/25
- [nongnu] elpa/subed 8acbd46e54 8/9: Add subed-jump-to-subtitle-start-pos and related function., ELPA Syncer, 2023/11/25
- [nongnu] elpa/subed 430ba0334f 4/9: subed-for-each-subtitle: handle WebVTT header,
ELPA Syncer <=