unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH 1/4] test: add `notmuch-hello-mode-hook-counter'
@ 2011-12-17  4:20 Dmitry Kurochkin
  2011-12-17  4:20 ` [PATCH 2/4] test: add test for `notmuch-hello-mode-hook' Dmitry Kurochkin
                   ` (5 more replies)
  0 siblings, 6 replies; 22+ messages in thread
From: Dmitry Kurochkin @ 2011-12-17  4:20 UTC (permalink / raw)
  To: notmuch

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.
---
 test/test-lib.el |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/test/test-lib.el b/test/test-lib.el
index 97ae593..3bca138 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)
-- 
1.7.7.3

^ permalink raw reply related	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2011-12-20 11:47 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-17  4:20 [PATCH 1/4] test: add `notmuch-hello-mode-hook-counter' Dmitry Kurochkin
2011-12-17  4:20 ` [PATCH 2/4] test: add test for `notmuch-hello-mode-hook' Dmitry Kurochkin
2011-12-17  4:20 ` [PATCH 3/4] test: add broken test for `notmuch-hello-mode-hook' called during update Dmitry Kurochkin
2011-12-17  4:20 ` [PATCH 4/4] emacs: do not call `notmuch-hello-mode' on update Dmitry Kurochkin
2011-12-17 20:16 ` [PATCH v2 0/4] " Dmitry Kurochkin
2011-12-17 20:16   ` [PATCH v2 1/4] test: add `notmuch-hello-mode-hook-counter' Dmitry Kurochkin
2011-12-17 20:16   ` [PATCH v2 2/4] test: add test for `notmuch-hello-mode-hook' Dmitry Kurochkin
2011-12-17 20:16   ` [PATCH v2 3/4] test: add broken test for `notmuch-hello-mode-hook' called during update Dmitry Kurochkin
2011-12-17 20:17   ` [PATCH v2 4/4] emacs: do not call `notmuch-hello-mode' on update Dmitry Kurochkin
2011-12-17 23:39 ` [PATCH v3 0/4] " Dmitry Kurochkin
2011-12-17 23:39   ` [PATCH v3 1/4] test: add `notmuch-hello-mode-hook-counter' Dmitry Kurochkin
2011-12-17 23:39   ` [PATCH v3 2/4] test: add test for `notmuch-hello-mode-hook' Dmitry Kurochkin
2011-12-17 23:39   ` [PATCH v3 3/4] test: add broken test for `notmuch-hello-mode-hook' called during update Dmitry Kurochkin
2011-12-17 23:39   ` [PATCH v3 4/4] emacs: do not call `notmuch-hello-mode' on update Dmitry Kurochkin
2011-12-18  0:16     ` Austin Clements
2011-12-18  0:21 ` [PATCH v4 0/4] " Dmitry Kurochkin
2011-12-18  0:21   ` [PATCH v4 1/4] test: add `notmuch-hello-mode-hook-counter' Dmitry Kurochkin
2011-12-18  0:21   ` [PATCH v4 2/4] test: add test for `notmuch-hello-mode-hook' Dmitry Kurochkin
2011-12-18  0:21   ` [PATCH v4 3/4] test: add broken test for `notmuch-hello-mode-hook' called during update Dmitry Kurochkin
2011-12-18  0:21   ` [PATCH v4 4/4] emacs: do not call `notmuch-hello-mode' on update Dmitry Kurochkin
2011-12-18  0:32   ` [PATCH v4 0/4] " Austin Clements
2011-12-20 11:47   ` David Bremner

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).