From e1092c5f279f21c8052e32d7d6602a24ab1c7f02 Mon Sep 17 00:00:00 2001 From: djcb Date: Sat, 5 Nov 2016 10:18:23 +0200 Subject: [PATCH] mu4e: restore mu4e-compose-type in compose-buffer Seems the `mu4e-compose-type' is always nil when we enter the compose (it is set when executing the pre-hooks though). It can be useful in the compose buffer as well, so restore it. --- mu4e/mu4e-compose.el | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mu4e/mu4e-compose.el b/mu4e/mu4e-compose.el index a2ec9ed9..f425539f 100644 --- a/mu4e/mu4e-compose.el +++ b/mu4e/mu4e-compose.el @@ -579,6 +579,12 @@ tempfile)." (mu4e~compose-hide-headers) ;; switch on the mode (mu4e-compose-mode) + + ;; set mu4e-compose-type once more for this buffer, + ;; we loose it after the mode-change, it seems + (set (make-local-variable 'mu4e-compose-type) compose-type) + (put 'mu4e-compose-type 'permanent-local t) + (when mu4e-compose-in-new-frame ;; make sure to close the frame when we're done with the message these are ;; all buffer-local;