[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/subed d1b308e 280/389: Make subed-subtitle-time-adjusted-h
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/subed d1b308e 280/389: Make subed-subtitle-time-adjusted-hook buffer-local |
Date: |
Fri, 3 Dec 2021 11:00:41 -0500 (EST) |
branch: elpa/subed
commit d1b308e2914ea5e1b7516cd4e85b510c4c126d43
Author: Random User <rndusr@posteo.de>
Commit: Random User <rndusr@posteo.de>
Make subed-subtitle-time-adjusted-hook buffer-local
---
subed/subed-config.el | 2 +-
tests/test-subed-common.el | 5 ++---
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/subed/subed-config.el b/subed/subed-config.el
index 57af80b..8c7c34c 100644
--- a/subed/subed-config.el
+++ b/subed/subed-config.el
@@ -229,7 +229,7 @@ hardcoded."
;; Hooks
-(defvar subed-subtitle-time-adjusted-hook ()
+(defvar-local subed-subtitle-time-adjusted-hook ()
"Functions to call when a subtitle's start or stop time has changed.
The functions are called with the subtitle's start time.")
diff --git a/tests/test-subed-common.el b/tests/test-subed-common.el
index bea81d4..cff02fb 100644
--- a/tests/test-subed-common.el
+++ b/tests/test-subed-common.el
@@ -165,8 +165,8 @@ Baz.
(it "runs the appropriate hook."
(let ((foo (setf (symbol-function 'foo) (lambda (msecs) ()))))
(spy-on 'foo)
- (add-hook 'subed-subtitle-time-adjusted-hook 'foo)
(with-temp-srt-buffer
+ (add-hook 'subed-subtitle-time-adjusted-hook 'foo)
(insert mock-srt-data)
(subed-jump-to-subtitle-id 1)
(expect (subed-adjust-subtitle-time-start 100) :to-equal 100)
@@ -181,8 +181,7 @@ Baz.
(expect 'foo :to-have-been-called-times 3)
(expect (subed-adjust-subtitle-time-stop 123) :to-equal 123)
(expect 'foo :to-have-been-called-with 122240)
- (expect 'foo :to-have-been-called-times 4))
- (remove-hook 'subed-subtitle-time-adjusted-hook 'foo)))
+ (expect 'foo :to-have-been-called-times 4))))
(it "adjusts the start/stop time."
(with-temp-srt-buffer
(insert mock-srt-data)
- [nongnu] elpa/subed df51c44 258/389: Rename test file for common functions, (continued)
- [nongnu] elpa/subed df51c44 258/389: Rename test file for common functions, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed c1e05c6 259/389: Remove empty line, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 9f0c939 260/389: subed-for-each-subtitle: Make all arguments mandatory, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 3c97061 264/389: Add subed--init-alist variable to track supported formats, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed f6acfdd 266/389: Re-order function suffixes, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 50a4717 268/389: Fix tests, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 7f361c2 269/389: Explain "adjust", "move" and "shift" in subed-mode docstring, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed d71655f 276/389: Fix parens, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed b740511 277/389: Use mark-active instead of use-region-p, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed e8612e7 279/389: Unify optional argument name, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed d1b308e 280/389: Make subed-subtitle-time-adjusted-hook buffer-local,
ELPA Syncer <=
- [nongnu] elpa/subed 0302aa9 278/389: Move screenshow below introduction, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed c8cf4b7 281/389: Don't insert too many mock subtitles, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 3245922 282/389: Focus correct subtitle, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed d076bac 285/389: Make enforced subtitle boundaries optional, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed b5667c4 286/389: Add tests for subed-enforce-time-boundaries, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed dde5dfd 287/389: Simplify subed-mpv--client-buffer, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed b1c5b88 354/389: Some adjustments to subed-split-subtitle, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 5f1ad41 355/389: "mpv" instead of "MPV" (see `man mpv`, https://mpv.io etc), ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed a83ee74 357/389: Remove trailing space, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed da4dac9 358/389: Two spaces after sentence to make `make test` pass, ELPA Syncer, 2021/12/03