diff options
| author | Mark Walters <markwalters1009@gmail.com> | 2016-10-08 21:05:22 +0100 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2016-10-09 08:53:01 -0300 |
| commit | 025bf3cd4af73020e1657dbb20e13cc0711b8d68 (patch) | |
| tree | 915f47a988387a3470c2152d5b4e2e769a43edd9 | |
| parent | 0c52b5d3b29205059dbd308fa8e52558df57401b (diff) | |
emacs: mua: extract a common message-send function.
This commit adds a common message-send function for message-send and
message-send-and-exit. At the moment the overlap is small, but the
message-send function will get more complex.
| -rw-r--r-- | emacs/notmuch-mua.el | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el index 55bc2672..72fb7705 100644 --- a/emacs/notmuch-mua.el +++ b/emacs/notmuch-mua.el @@ -490,15 +490,20 @@ will be addressed to all recipients of the source message." (notmuch-mua-reply query-string sender reply-all) (deactivate-mark))) -(defun notmuch-mua-send-and-exit (&optional arg) +(defun notmuch-mua-send-common (arg &optional exit) (interactive "P") (letf (((symbol-function 'message-do-fcc) #'notmuch-maildir-message-do-fcc)) - (message-send-and-exit arg))) + (if exit + (message-send-and-exit arg) + (message-send arg)))) + +(defun notmuch-mua-send-and-exit (&optional arg) + (interactive "P") + (notmuch-mua-send-common arg 't)) (defun notmuch-mua-send (&optional arg) (interactive "P") - (letf (((symbol-function 'message-do-fcc) #'notmuch-maildir-message-do-fcc)) - (message-send arg))) + (notmuch-mua-send-common arg)) (defun notmuch-mua-kill-buffer () (interactive) |
