X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=test%2Ftest-lib.el;h=3bca1382bc386a618a867c789bafea25d3e8f18c;hb=33735c28a42d8b4a5432507430aa0000bc9d4ada;hp=97ae5938da62a42eb778c626429783350bca93d8;hpb=95cf33cc78c318e9833e9c9fe0a656b6a80e6bea;p=notmuch diff --git a/test/test-lib.el b/test/test-lib.el index 97ae5938..3bca1382 100644 --- a/test/test-lib.el +++ b/test/test-lib.el @@ -61,3 +61,12 @@ running, quit if it terminated." (if (not (process-attributes pid)) (kill-emacs) (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)