[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/subed a37991acf4 2/3: subed-align: Restore comments follow
|
From: |
ELPA Syncer |
|
Subject: |
[nongnu] elpa/subed a37991acf4 2/3: subed-align: Restore comments following the same sequence |
|
Date: |
Fri, 10 Nov 2023 19:00:35 -0500 (EST) |
branch: elpa/subed
commit a37991acf4ade748dbe8f460f00388cd10254805
Author: Sacha Chua <sacha@sachachua.com>
Commit: Sacha Chua <sacha@sachachua.com>
subed-align: Restore comments following the same sequence
* subed/subed-config.el (subed-audio-extensions): Add m4a.
* subed/subed-align.el (subed-align-reinsert-comments): Restore
comments in the same sequence.
---
subed/subed-align.el | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/subed/subed-align.el b/subed/subed-align.el
index abe479e731..8f66921f9a 100644
--- a/subed/subed-align.el
+++ b/subed/subed-align.el
@@ -95,16 +95,14 @@ Return a buffer with FORMAT."
(subed-align-reinsert-comments subtitles)))))
(defun subed-align-reinsert-comments (subtitles)
- "Reinsert the comments from SUBTITLES."
+ "Reinsert the comments from SUBTITLES.
+Assume that the subtitles are still in the same sequence."
(goto-char (point-min))
- (mapc
+ (seq-map
(lambda (sub)
+ (subed-forward-subtitle-time-start)
(when (elt sub 4)
- ;; find the first subtitle that matches the sub, although the times may
have changed.
- ;; Probably the midpoint of the subtitle will still be within the sub
- ;; TODO: Accommodate comments in other formats
- (when (subed-jump-to-subtitle-id-at-msecs (/ (+ (elt sub 2) (elt sub
1)) 2))
- (insert (elt sub 4)))))
+ (insert (elt sub 4))))
subtitles))
(provide 'subed-align)