Move notmuch-fcc-header-setup to message-header-setup-hook.

Call notmuch-fcc-header-setup from message-header-setup-hook rather
than message-send-hook.  This allows you to see what's going to
happen, and to make manual adjustments if desired.  Gnus does
something similar.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
This commit is contained in:
Rob Browning 2010-09-12 15:23:38 -05:00 committed by Carl Worth
parent 04b27c0d4c
commit b67c3ed609

View file

@ -68,7 +68,7 @@
'(lambda (destdir) '(lambda (destdir)
(notmuch-maildir-fcc-write-buffer-to-maildir destdir t))) (notmuch-maildir-fcc-write-buffer-to-maildir destdir t)))
;;add a hook to actually insert the Fcc header when sending ;;add a hook to actually insert the Fcc header when sending
(add-hook 'message-send-hook 'notmuch-fcc-header-setup)) (add-hook 'message-header-setup-hook 'notmuch-fcc-header-setup))
(defun notmuch-fcc-header-setup () (defun notmuch-fcc-header-setup ()
"Adds an appropriate fcc header to the current mail buffer "Adds an appropriate fcc header to the current mail buffer