From: Mark Walters <markwalters1009@gmail.com>
To: notmuch@notmuchmail.org
Subject: [PATCH 1/2] emacs: mua: extract a common message-send function.
Date: Sun, 2 Oct 2016 15:05:30 +0100 [thread overview]
Message-ID: <1475417131-24915-2-git-send-email-markwalters1009@gmail.com> (raw)
In-Reply-To: <1475417131-24915-1-git-send-email-markwalters1009@gmail.com>
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.
---
emacs/notmuch-mua.el | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el
index 55bc267..72fb770 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)
--
2.1.4
next prev parent reply other threads:[~2016-10-02 14:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-02 14:05 [PATCH 0/2] Check for misplaced secure mml tags Mark Walters
2016-10-02 14:05 ` Mark Walters [this message]
2016-10-02 14:05 ` [PATCH 2/2] emacs: mua: check " Mark Walters
2016-10-08 14:57 ` David Bremner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1475417131-24915-2-git-send-email-markwalters1009@gmail.com \
--to=markwalters1009@gmail.com \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).