mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-25 12:28:09 +01:00
test: add `notmuch-hello-mode-hook-counter'
Add `notmuch-hello-mode-hook-counter' hook to count how many times `notmuch-hello-mode-hook' was called. The counter function increments `notmuch-hello-mode-hook-counter' variable value if it is bount, otherwise it does nothing.
This commit is contained in:
parent
a2d0215a58
commit
33735c28a4
1 changed files with 9 additions and 0 deletions
|
@ -61,3 +61,12 @@ running, quit if it terminated."
|
||||||
(if (not (process-attributes pid))
|
(if (not (process-attributes pid))
|
||||||
(kill-emacs)
|
(kill-emacs)
|
||||||
(run-at-time "1 min" nil 'orphan-watchdog pid)))
|
(run-at-time "1 min" nil 'orphan-watchdog pid)))
|
||||||
|
|
||||||
|
(defun notmuch-hello-mode-hook-counter ()
|
||||||
|
"Count how many times `notmuch-hello-mode-hook' is called.
|
||||||
|
Increments `notmuch-hello-mode-hook-counter' variable value if it
|
||||||
|
is bound, otherwise does nothing."
|
||||||
|
(if (boundp 'notmuch-hello-mode-hook-counter)
|
||||||
|
(setq notmuch-hello-mode-hook-counter
|
||||||
|
(1+ notmuch-hello-mode-hook-counter))))
|
||||||
|
(add-hook 'notmuch-hello-mode-hook 'notmuch-hello-mode-hook-counter)
|
||||||
|
|
Loading…
Reference in a new issue