branch: elpa/subed commit 9f55817c9bb27d2bb74b7deb0981b296b4274885 Author: Marcin Borkowski <mb...@mbork.pl> Commit: Marcin Borkowski <mb...@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)))