[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/subed 9f0c939 260/389: subed-for-each-subtitle: Make all a
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/subed 9f0c939 260/389: subed-for-each-subtitle: Make all arguments mandatory |
Date: |
Fri, 3 Dec 2021 11:00:38 -0500 (EST) |
branch: elpa/subed
commit 9f0c9394890d42d6f80b5d45ade5f847421148b4
Author: Random User <rndusr@posteo.de>
Commit: Random User <rndusr@posteo.de>
subed-for-each-subtitle: Make all arguments mandatory
This fixes subed-shift-subtitle-backward, which only shifted the current
and the
next subtitle.
---
subed/subed-common.el | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/subed/subed-common.el b/subed/subed-common.el
index 1d33620..54f53f6 100644
--- a/subed/subed-common.el
+++ b/subed/subed-common.el
@@ -92,7 +92,7 @@ subtitles) as long the subtitle IDs don't change."
('beginning-of-buffer nil)
('end-of-buffer nil)))))
-(defmacro subed-for-each-subtitle (&optional beg end reverse &rest body)
+(defmacro subed-for-each-subtitle (beg end reverse &rest body)
"Run BODY for each subtitle between the region specified by BEG and END.
If END is nil, it defaults to `point-max'.
If BEG and END are both nil, run BODY only on the subtitle at point.
@@ -312,6 +312,7 @@ because we'd overlap with the next subtitle.
When moving subtitles backward (MSECS < 0), it's the same thing
but we move the start time first."
(if (> msecs 0)
+ ;; Moving forward
(lambda (msecs &optional ignore-limits)
(let ((msecs (subed-adjust-subtitle-time-stop msecs
:ignore-negative-duration
@@ -319,6 +320,7 @@ but we move the start time first."
(when msecs (subed-adjust-subtitle-time-start msecs
:ignore-negative-duration
ignore-limits))))
+ ;; Moving backward
(lambda (msecs &optional ignore-limits)
(let ((msecs (subed-adjust-subtitle-time-start msecs
:ignore-negative-duration
@@ -366,7 +368,7 @@ but we move the start time first."
(unless (setq msecs (move-subtitle msecs))
(throw 'bumped-into-subtitle t))
(subed-forward-subtitle-id)
- (subed-for-each-subtitle (point) end
+ (subed-for-each-subtitle (point) end nil
(move-subtitle msecs :ignore-spacing)))))))))
(defun subed-move-subtitles (msecs &optional beg end)
- [nongnu] elpa/subed daaf480 340/389: subed-vtt: Fix navigation code, (continued)
- [nongnu] elpa/subed daaf480 340/389: subed-vtt: Fix navigation code, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 9642945 346/389: Further fixes to let tests pass, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 0968590 344/389: Fix separator search in subed-srt--validate, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 9e661cc 351/389: New command subed-split-subtitle splits at point with MPV timestamp, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed a63c362 252/389: More work on README, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed b5da89e 254/389: Move defgroup to the top, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 7d5c543 255/389: Add function: subed-srt--init, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 3036e7c 256/389: Remove stale comment, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed df51c44 258/389: Rename test file for common functions, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed c1e05c6 259/389: Remove empty line, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 9f0c939 260/389: subed-for-each-subtitle: Make all arguments mandatory,
ELPA Syncer <=
- [nongnu] elpa/subed 3c97061 264/389: Add subed--init-alist variable to track supported formats, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed f6acfdd 266/389: Re-order function suffixes, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 50a4717 268/389: Fix tests, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 7f361c2 269/389: Explain "adjust", "move" and "shift" in subed-mode docstring, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed d71655f 276/389: Fix parens, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed b740511 277/389: Use mark-active instead of use-region-p, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed e8612e7 279/389: Unify optional argument name, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed d1b308e 280/389: Make subed-subtitle-time-adjusted-hook buffer-local, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 0302aa9 278/389: Move screenshow below introduction, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed c8cf4b7 281/389: Don't insert too many mock subtitles, ELPA Syncer, 2021/12/03