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

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

[nongnu] elpa/subed 09e9d0232c 1/7: Add subed-append-subtitle-list for e


From: ELPA Syncer
Subject: [nongnu] elpa/subed 09e9d0232c 1/7: Add subed-append-subtitle-list for easier bulk-adding
Date: Sun, 5 Nov 2023 10:00:47 -0500 (EST)

branch: elpa/subed
commit 09e9d0232c4a6b8def4e2b5240b65d3ca00f4ebc
Author: Sacha Chua <sacha@sachachua.com>
Commit: Sacha Chua <sacha@sachachua.com>

    Add subed-append-subtitle-list for easier bulk-adding
    
    * subed/subed-common.el (subed-append-subtitle-list): New function.
    (subed-create-file): Use subed-append-subtitle-list.
---
 subed/subed-common.el | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/subed/subed-common.el b/subed/subed-common.el
index 3c683042c8..0fd3fe768c 100644
--- a/subed/subed-common.el
+++ b/subed/subed-common.el
@@ -592,6 +592,11 @@ If BEG and END are not specified, use the whole buffer."
         (setq result (cons (subed-subtitle) result))))
     (nreverse result)))
 
+(defun subed-append-subtitle-list (subtitles)
+  "Append SUBTITLES.
+SUBTITLES should be a list with entries of the form (id start stop text 
comment)."
+  (mapc (lambda (sub) (apply #'subed-append-subtitle sub)) subtitles))
+
 (defun subed-subtitle-list-text (subtitles &optional include-comments)
   "Return the text in SUBTITLES.
 If INCLUDE-COMMENTS is non-nil, include the comments.
@@ -2140,7 +2145,7 @@ If INIT-FUNC is non-nil, call that function to 
initialize."
     (erase-buffer)
     (if init-func (funcall init-func))
     (subed-auto-insert)
-    (mapc (lambda (sub) (apply #'subed-append-subtitle nil (cdr sub))) 
subtitles)))
+    (subed-append-subtitle-list subtitles)))
 
 (defun subed-convert (format &optional include-comments)
   "Create a buffer with the current subtitles converted to FORMAT.



reply via email to

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