mu4e-compose: fix external use (`compose-mail')

Ensure compose-mail with mu works again, including passing various
parameters.

Fixes #1695.
This commit is contained in:
Dirk-Jan C. Binnema 2020-05-15 23:41:04 +03:00
parent 59ddfb410c
commit a2d315df4c
1 changed files with 6 additions and 2 deletions

View File

@ -859,7 +859,7 @@ called after the mail has been sent or put aside, and the mail
buffer buried."
;; create a new draft message 'resetting' (as below) is not actually needed in this case, but
;; let's prepare for the re-edit case as well
(mu4e~compose-handler 'new)
(mu4e~compose-handler-real 'new)
(when (message-goto-to) ;; reset to-address, if needed
(message-delete-line))
@ -891,7 +891,11 @@ buffer buried."
;; happily, we can re-use most things from message mode
;;;###autoload
(define-mail-user-agent 'mu4e-user-agent
'mu4e~compose-mail
(lambda (to subject other-headers continue switch-function yank-action
send-actions return-action)
(mu4e~start (lambda() (mu4e~compose-mail to subject other-headers continue
switch-function yank-action
send-actions return-action))))
'message-send-and-exit
'message-kill-buffer
'message-send-hook)