Breaking change: rewrite add-transient-hook!
HOOK is now evaluated. Hooks should be quoted (and functions
sharp-quoted).
This also fixes commit 0150f78e
.
This commit is contained in:
parent
0d9c0e7f54
commit
baad7953bf
6 changed files with 26 additions and 18 deletions
|
@ -44,14 +44,14 @@
|
|||
;; `add-transient-hook!'
|
||||
(ert-deftest transient-hooks ()
|
||||
(let (hooks value)
|
||||
(add-transient-hook! hooks (setq value t))
|
||||
(add-transient-hook! 'hooks (setq value t))
|
||||
(run-hooks 'hooks)
|
||||
(should (eq value t))
|
||||
(should (null hooks))))
|
||||
|
||||
(ert-deftest transient-function ()
|
||||
(let (value)
|
||||
(add-transient-hook! ignore (setq value (not value)))
|
||||
(add-transient-hook! #'ignore (setq value (not value)))
|
||||
(ignore t)
|
||||
(should (eq value t))
|
||||
;; repeat to ensure it was only run once
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue