You may want to customize `message-kill-buffer-on-exit'
accordingly."
(when (< emacs-major-version 24)
- " Due to a known bug in Emacs 23, you should not set
+ " Due to a known bug in Emacs 23, you should not set
this to `new-window' if `message-kill-buffer-on-exit' is
disabled: this would result in an incorrect behavior."))
:group 'notmuch-send
(message-goto-body)
(set-buffer-modified-p nil))
-(define-derived-mode notmuch-message-mode message-mode "Notmuch Message"
- "Notmuch message composition mode. Mostly like `message-mode'")
+(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)))
+
+(define-key notmuch-message-mode-map (kbd "C-c C-c") #'notmuch-mua-send-and-exit)
+(define-key notmuch-message-mode-map (kbd "C-c C-s") #'notmuch-mua-send)
(defun notmuch-mua-mail (&optional to subject other-headers &rest other-args)
"Invoke the notmuch mail composition window.
(apply #'message-mail to subject other-headers other-args)
(notmuch-message-mode)
+ (notmuch-fcc-header-setup)
(message-sort-headers)
(message-hide-headers)
(set-buffer-modified-p nil)
(defun notmuch-mua-send-and-exit (&optional arg)
(interactive "P")
- (message-send-and-exit arg))
+ (let ((message-fcc-handler-function #'notmuch-fcc-handler))
+ (message-send-and-exit arg)))
+
+(defun notmuch-mua-send (&optional arg)
+ (interactive "P")
+ (let ((message-fcc-handler-function #'notmuch-fcc-handler))
+ (message-send arg)))
(defun notmuch-mua-kill-buffer ()
(interactive)