Comments
Patch
@@ -471,6 +471,8 @@ buffer."
(progn
(insert "--text follows this line--")
(forward-line)))
+ (save-excursion
+ (run-hooks 'notmuch-reply-hook))
(message-mode))
(defun notmuch-show-reply ()
@@ -1107,6 +1109,14 @@ All currently available key bindings:
:options '(hl-line-mode)
:group 'notmuch)
+(defcustom notmuch-reply-hook nil
+ "List of functions to call when replying to a message.
+Run after the buffer content is returned from notmuch and before
+handing off to message mode. The function `notmuch-reply' runs
+this hook."
+ :type 'hook
+ :group 'notmuch)
+
(defun notmuch-show-do-stash (text)
(kill-new text)
(message (concat "Saved: " text)))
From: David Bremner <bremner@unb.ca> This patch introduces a variable notmuch-reply-hook and calls it using run-hooks. This allows people to easily override the header setup and so forth done by notmuch. --- This is my solution to trying to rationalize the headers of 'm' versus 'r'; now I just call the same hook in both cases. There is actually only 2 lines of code added; the rest is a defcustom, docstrings and so on. notmuch.el | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-)