]> git.notmuchmail.org Git - notmuch/commitdiff
emacs: add notmuch-hello-refresh-hook
authorThomas Jost <schnouki@schnouki.net>
Wed, 21 Dec 2011 01:28:14 +0000 (02:28 +0100)
committerDavid Bremner <bremner@debian.org>
Wed, 21 Dec 2011 11:52:10 +0000 (07:52 -0400)
This hook is called every time a notmuch-hello buffer is updated.

emacs/notmuch-hello.el

index 45cda2ec750617cd941a773bf199f882ef4d5093..f892ff736a74a5c7864d87f9e4f984e9343ec3d7 100644 (file)
@@ -143,6 +143,11 @@ Typically \",\" in the US and UK and \".\" in Europe."
   :group 'notmuch
   :type 'hook)
 
   :group 'notmuch
   :type 'hook)
 
+(defcustom notmuch-hello-refresh-hook nil
+  "Functions called after updating a `notmuch-hello' buffer."
+  :type 'hook
+  :group 'notmuch)
+
 (defvar notmuch-hello-url "http://notmuchmail.org"
   "The `notmuch' web site.")
 
 (defvar notmuch-hello-url "http://notmuchmail.org"
   "The `notmuch' web site.")
 
@@ -590,7 +595,9 @@ Complete list of currently available key bindings:
          (widget-forward 1)))
 
       (unless (widget-at)
          (widget-forward 1)))
 
       (unless (widget-at)
-       (notmuch-hello-goto-search)))))
+       (notmuch-hello-goto-search))))
+
+  (run-hooks 'notmuch-hello-refresh-hook))
 
 (defun notmuch-folder ()
   "Deprecated function for invoking notmuch---calling `notmuch' is preferred now."
 
 (defun notmuch-folder ()
   "Deprecated function for invoking notmuch---calling `notmuch' is preferred now."