]> git.notmuchmail.org Git - notmuch/blobdiff - emacs/notmuch-mua.el
emacs: simplify our local copy of message-do-fcc
[notmuch] / emacs / notmuch-mua.el
index f3a4e5a32cf359144eb9c1696b7a6e164edf3add..fadf20fec7a7d6312ec8ad86d744b8743e9a129d 100644 (file)
@@ -32,7 +32,7 @@
 
 (declare-function notmuch-show-insert-body "notmuch-show" (msg body depth))
 (declare-function notmuch-fcc-header-setup "notmuch-maildir-fcc" ())
-(declare-function notmuch-fcc-handler "notmuch-maildir-fcc" (destdir))
+(declare-function notmuch-maildir-message-do-fcc "notmuch-maildir-fcc" ())
 
 ;;
 
@@ -276,8 +276,7 @@ mutiple parts get a header."
 
 (define-derived-mode notmuch-message-mode message-mode "Message[Notmuch]"
   "Notmuch message composition mode. Mostly like `message-mode'"
-  (when notmuch-address-command
-    (notmuch-address-setup)))
+  (notmuch-address-setup))
 
 (put 'notmuch-message-mode 'flyspell-mode-predicate 'mail-mode-flyspell-verify)
 
@@ -490,13 +489,13 @@ will be addressed to all recipients of the source message."
 
 (defun notmuch-mua-send-and-exit (&optional arg)
   (interactive "P")
-  (let ((message-fcc-handler-function #'notmuch-fcc-handler))
-    (message-send-and-exit arg)))
+  (letf (((symbol-function 'message-do-fcc) #'notmuch-maildir-message-do-fcc))
+       (message-send-and-exit arg)))
 
 (defun notmuch-mua-send (&optional arg)
   (interactive "P")
-  (let ((message-fcc-handler-function #'notmuch-fcc-handler))
-    (message-send arg)))
+  (letf (((symbol-function 'message-do-fcc) #'notmuch-maildir-message-do-fcc))
+       (message-send arg)))
 
 (defun notmuch-mua-kill-buffer ()
   (interactive)