mu4e-compose: return new buffer from mu4e--compose-setup

I.e, and this applies to all mu4e-compose-* composition functions as
well.

Fixes #2653.
This commit is contained in:
Dirk-Jan C. Binnema 2024-03-03 09:42:58 +02:00
parent 131f084677
commit e28c2487d3
1 changed files with 6 additions and 3 deletions

View File

@ -747,7 +747,9 @@ COMPOSE-FUNC is a function / lambda to create the specific type
of message.
Optionally, SWITCH determines how to find a buffer for the message
(see SWITCH-FUNCTION in `compose-mail')."
(see SWITCH-FUNCTION in `compose-mail').
Returns the new buffer."
(cl-assert (member compose-type '(reply forward edit new)))
(unless (mu4e-running-p) (mu4e 'background)) ;; start if needed
(let* ((parent
@ -775,7 +777,8 @@ Optionally, SWITCH determines how to find a buffer for the message
(setq-local ;;message-kill-actions actions
message-return-actions actions
message-send-actions actions
message-kill-actions actions)))))
message-kill-actions actions))
(current-buffer))))
;;;###autoload
@ -875,7 +878,7 @@ must be from current user, as determined through
;;;###autoload
(defun mu4e-compose-resend (address)
"Re-send the message at point.
The message is resent as-is, without any editing. "
The message is resent as-is, without any editing."
(interactive
(list (completing-read
"Resend message to address: " mu4e--contacts-set)))