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

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

[nongnu] elpa/subed 9f55817 369/389: Wrap start/stop calculating functio


From: ELPA Syncer
Subject: [nongnu] elpa/subed 9f55817 369/389: Wrap start/stop calculating functions in `ignore-errors'
Date: Fri, 3 Dec 2021 11:01:00 -0500 (EST)

branch: elpa/subed
commit 9f55817c9bb27d2bb74b7deb0981b296b4274885
Author: Marcin Borkowski <mbork@mbork.pl>
Commit: Marcin Borkowski <mbork@mbork.pl>

    Wrap start/stop calculating functions in `ignore-errors'
    
    This fixes an issue when these functions errored out during changes
    that temporarily broke the correctness of the timestamps, like
    `undo'.
---
 subed/subed-common.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/subed/subed-common.el b/subed/subed-common.el
index d0ca925..5fdc61c 100644
--- a/subed/subed-common.el
+++ b/subed/subed-common.el
@@ -1073,8 +1073,8 @@ Return nil if function `buffer-file-name' returns nil."
 (defun subed-calculate-cps (&optional print-message)
   "Calculate characters per second of the current subtitle."
   (interactive "p")
-  (let* ((msecs-start (subed-subtitle-msecs-start))
-        (msecs-stop (subed-subtitle-msecs-stop))
+  (let* ((msecs-start (ignore-errors (subed-subtitle-msecs-start)))
+        (msecs-stop (ignore-errors (subed-subtitle-msecs-stop)))
         (text (if (fboundp subed-transform-for-cps)
                   (funcall subed-transform-for-cps (subed-subtitle-text))
                 (subed-subtitle-text)))



reply via email to

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