mu4e: set mu4e-compose-type earlier

So it can be used in hooks.

Fixes #1616.
This commit is contained in:
Dirk-Jan C. Binnema
2020-03-16 22:41:39 +02:00
parent 441f005316
commit 83558be663

View File

@ -646,6 +646,9 @@ tempfile)."
;; bind to `mu4e-compose-parent-message' of compose buffer
(set (make-local-variable 'mu4e-compose-parent-message) original-msg)
(put 'mu4e-compose-parent-message 'permanent-local t)
;; set mu4e-compose-type once more for this buffer,
(set (make-local-variable 'mu4e-compose-type) compose-type)
(put 'mu4e-compose-type 'permanent-local t)
;; hide some headers
(mu4e~compose-hide-headers)
@ -654,10 +657,6 @@ tempfile)."
;; don't allow undoing anything before this.
(setq buffer-undo-list nil)
;; 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