[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/subed f06d5f8 124/389: Add macro: subed--with-subtitle-rep
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/subed f06d5f8 124/389: Add macro: subed--with-subtitle-replay-disabled |
Date: |
Fri, 3 Dec 2021 11:00:10 -0500 (EST) |
branch: elpa/subed
commit f06d5f8879062f98a561f26e1bfa6d20cb1be755
Author: Random User <rndusr@posteo.de>
Commit: Random User <rndusr@posteo.de>
Add macro: subed--with-subtitle-replay-disabled
---
subed/subed.el | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/subed/subed.el b/subed/subed.el
index 858b00a..b370136 100644
--- a/subed/subed.el
+++ b/subed/subed.el
@@ -159,6 +159,15 @@ Before BODY is run, point is placed on the subtitle's ID."
(unless (subed-forward-subtitle-id)
(throw 'last-subtitle-reached t))))))))
+(defmacro subed--with-subtitle-replay-disabled (&rest body)
+ "Run BODY while automatic subtitle replay is disabled."
+ (declare (indent defun))
+ `(let ((replay-was-enabled-p (subed-replay-adjusted-subtitle-p)))
+ (subed-disable-replay-adjusted-subtitle :quiet)
+ (progn ,@body)
+ (when replay-was-enabled-p
+ (subed-enable-replay-adjusted-subtitle :quiet))))
+
(defun subed--right-pad (string length fillchar)
"Use FILLCHAR to make STRING LENGTH characters long."
(concat string (make-string (- length (length string)) fillchar)))
- [nongnu] elpa/subed 9ccfef7 096/389: Add subed--right-pad, (continued)
- [nongnu] elpa/subed 9ccfef7 096/389: Add subed--right-pad, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed d4b1ddf 103/389: Rename subed-seconds-adjust/move to subed-milliseconds-adjust/move, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed bdcdb0a 100/389: Remove deprecated variables, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 181b9f0 099/389: Test for lacking digits in millisecond, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 03dd3c6 106/389: Make subed-move-subtitle-forward/backward work with region (sort of), ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 0f385d6 110/389: Keep logging debug messages when debugging is disabled, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 612f12a 111/389: Add "moving marked subtitles forward/backward in time" to features, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 4522e1a 113/389: Change keybindings to better conform with major mode conventions, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed ecbfd7f 119/389: Remove useless (progn ...), ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 1950bb0 121/389: subed--replay-adjusted-subtitle: Show debug message before doing the deed, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed f06d5f8 124/389: Add macro: subed--with-subtitle-replay-disabled,
ELPA Syncer <=
- [nongnu] elpa/subed 3fafab8 125/389: Disable subtitle replay during subtitle movement, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 382e83c 126/389: Add more tests for moving subtitles, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed d1a0b2f 127/389: Remove unnecessary spy-on, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 61cf9ce 129/389: Remove garbage tests for point-to-player syncing, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 3aa9a71 131/389: Pause player by default when editing subtitle text, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed d85f988 136/389: Add keybindings for subed-shift-subtitle-forward/backward, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 5b90306 140/389: Round mpv's playback position to prevent float weirdness (n.99999...), ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 0f3add7 141/389: Temporarily disable point-to-player syncing when adjusting time, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 3081983 144/389: Add commentary section to header, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed c069e23 145/389: subed is named "subed", ELPA Syncer, 2021/12/03