From e28c2487d3683a5eb9b05ec9890ea637ea2a03c3 Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Sun, 3 Mar 2024 09:42:58 +0200 Subject: [PATCH] mu4e-compose: return new buffer from mu4e--compose-setup I.e, and this applies to all mu4e-compose-* composition functions as well. Fixes #2653. --- mu4e/mu4e-compose.el | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/mu4e/mu4e-compose.el b/mu4e/mu4e-compose.el index 7a31bdfb..9e878c23 100644 --- a/mu4e/mu4e-compose.el +++ b/mu4e/mu4e-compose.el @@ -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)))