mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-25 04:18:08 +01:00
Add an argument to notmuch-mua-mail
From the emacs changelog: ** `compose-mail' now accepts an optional 8th arg, RETURN-ACTION, and passes it to the mail user agent function. This argument specifies an action for returning to the caller after finishing with the mail. This is currently used by Rmail to delete a mail window. Under Emacs 24, notmuch breaks when this argument is passed to it by a function in another part of Emacs. One example of a functon that does this is report-emacs-bug -- so notmuch users cannot file emacs bug reports! This patch also adds a &rest argument to the arg-list of this function, to future-proof against such changes. This is adapted from the approach taken by message-mail, a similar function built into emacs. This patch was originally submitted by richardmurri@gmail.com on Aug. 1: id:"877h6x6oor.fsf@veracitynetworks.com"
This commit is contained in:
parent
47b5797261
commit
a2d0215a58
1 changed files with 5 additions and 5 deletions
|
@ -124,9 +124,10 @@ list."
|
|||
|
||||
(message-goto-to))
|
||||
|
||||
(defun notmuch-mua-mail (&optional to subject other-headers continue
|
||||
switch-function yank-action send-actions)
|
||||
"Invoke the notmuch mail composition window."
|
||||
(defun notmuch-mua-mail (&optional to subject other-headers &rest other-args)
|
||||
"Invoke the notmuch mail composition window.
|
||||
|
||||
OTHER-ARGS are passed through to `message-mail'."
|
||||
(interactive)
|
||||
|
||||
(when notmuch-mua-user-agent-function
|
||||
|
@ -138,8 +139,7 @@ list."
|
|||
(push (cons "From" (concat
|
||||
(notmuch-user-name) " <" (notmuch-user-primary-email) ">")) other-headers))
|
||||
|
||||
(message-mail to subject other-headers continue
|
||||
switch-function yank-action send-actions)
|
||||
(apply #'message-mail to subject other-headers other-args)
|
||||
(message-sort-headers)
|
||||
(message-hide-headers)
|
||||
(set-buffer-modified-p nil)
|
||||
|
|
Loading…
Reference in a new issue