[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/subed 918ba6f 370/389: Prevent showing the "Match data clo
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/subed 918ba6f 370/389: Prevent showing the "Match data clobbered" message |
Date: |
Fri, 3 Dec 2021 11:01:00 -0500 (EST) |
branch: elpa/subed
commit 918ba6fa9841d09a7326b6cc9649345ad401c8e3
Author: Marcin Borkowski <mbork@mbork.pl>
Commit: Marcin Borkowski <mbork@mbork.pl>
Prevent showing the "Match data clobbered" message
---
subed/subed-common.el | 25 +++++++++++++------------
1 file changed, 13 insertions(+), 12 deletions(-)
diff --git a/subed/subed-common.el b/subed/subed-common.el
index 5fdc61c..0c80cf5 100644
--- a/subed/subed-common.el
+++ b/subed/subed-common.el
@@ -1073,18 +1073,19 @@ 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 (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)))
- (length (length text))
- (cps (when (and (numberp msecs-stop)
- (numberp msecs-start))
- (/ length 0.001 (- msecs-stop msecs-start)))))
- (if (and print-message cps)
- (message "%.1f characters per second" cps)
- cps)))
+ (save-match-data
+ (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)))
+ (length (length text))
+ (cps (when (and (numberp msecs-stop)
+ (numberp msecs-start))
+ (/ length 0.001 (- msecs-stop msecs-start)))))
+ (if (and print-message cps)
+ (message "%.1f characters per second" cps)
+ cps))))
(defvar-local subed--cps-overlay nil)
- [nongnu] elpa/subed 7764909 324/389: Add some (require ...)s to prevent compiler warnings, (continued)
- [nongnu] elpa/subed 7764909 324/389: Add some (require ...)s to prevent compiler warnings, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed a084f5d 326/389: Improve comment, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed cd3af86 328/389: Silence checkdoc, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 29d8b84 337/389: Initial implementation of subed-vtt.el, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 6db0005 338/389: New function subed-mpv-play-video-from-url, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed d3df6f2 347/389: Fix "test" target in Makefile, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 5b8c23a 348/389: New commands: subed-merge-with-next, subed-merge-with-previous, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed a7b25c8 341/389: subed-vtt: Fix ID->timestamp and stop generating IDs, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 9796a77 349/389: Merge branch 'sacha', ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed c4e3fec 352/389: Add error handling for subed-split-subtitle, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 918ba6f 370/389: Prevent showing the "Match data clobbered" message,
ELPA Syncer <=
- [nongnu] elpa/subed 808ef92 118/389: Fix comment, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 97bb125 183/389: Add default keybindings for copying player position, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 7665826 248/389: Add tests for copying player position to start/stop time, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed a280e89 251/389: Add more text to README, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 311f4af 331/389: Require Emacs 25.1, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed fc7a12d 335/389: Fix mpv arguments, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed d9c41ba 345/389: Add test for validation fix, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 8bdec56 356/389: Move subed-split-subtitle to "Inserting" section, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed b28f528 364/389: Revert indentation changes, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 5b868c3 366/389: Fix minor issues in README.org added in last commit, ELPA Syncer, 2021/12/03