--- emacs/notmuch.el | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/emacs/notmuch.el b/emacs/notmuch.el index 5ab3df7..4900a27 100644 --- a/emacs/notmuch.el +++ b/emacs/notmuch.el @@ -185,6 +185,11 @@ For a mouse binding, return nil." (set-buffer-modified-p nil) (view-buffer (current-buffer) 'kill-buffer-if-not-modified)))) +(defcustom notmuch-hook nil + "Functions to call when notmuch is started, before `notmuch-hello' buffer is created." + :group 'notmuch + :type 'hook) + (defcustom notmuch-search-hook '(hl-line-mode) "List of functions to call when notmuch displays the search results." :type 'hook @@ -895,6 +900,7 @@ current search results AND that are tagged with the given tag." (defun notmuch () "Run notmuch and display saved searches, known tags, etc." (interactive) + (run-hooks 'notmuch-hook) (notmuch-hello)) (setq mail-user-agent 'notmuch-user-agent) -- 1.7.1