Make mu4e-compose-in-new-frame always kill frame
When `message-kill-buffer-on-exit` was set to nil mu4e would not close the new frame. Closing the new frame should be independent of killing the buffer. This patch corrects this. (relates to #615)
This commit is contained in:
@ -400,16 +400,17 @@ the appropriate flag at the message forwarded or replied-to."
|
|||||||
;; this seems a bit hamfisted...
|
;; this seems a bit hamfisted...
|
||||||
(dolist (buf (buffer-list))
|
(dolist (buf (buffer-list))
|
||||||
(when (and (buffer-file-name buf)
|
(when (and (buffer-file-name buf)
|
||||||
(string= (buffer-file-name buf) path)
|
(string= (buffer-file-name buf) path))
|
||||||
message-kill-buffer-on-exit)
|
|
||||||
(if (and mu4e-compose-in-new-frame (window-system))
|
(if (and mu4e-compose-in-new-frame (window-system))
|
||||||
(progn
|
(progn
|
||||||
(switch-to-buffer buf)
|
(switch-to-buffer buf)
|
||||||
(when (and (get-buffer-window buf)
|
(when (and (get-buffer-window buf)
|
||||||
(window-frame (get-buffer-window buf)))
|
(window-frame (get-buffer-window buf)))
|
||||||
(kill-buffer buf)
|
|
||||||
(delete-frame (window-frame (get-buffer-window buf)))))
|
(delete-frame (window-frame (get-buffer-window buf)))))
|
||||||
(kill-buffer buf))))
|
)
|
||||||
|
(if message-kill-buffer-on-exit
|
||||||
|
(kill-buffer buf))
|
||||||
|
))
|
||||||
;; now, try to go back to some previous buffer, in the order
|
;; now, try to go back to some previous buffer, in the order
|
||||||
;; view->headers->main
|
;; view->headers->main
|
||||||
(if (buffer-live-p mu4e~view-buffer)
|
(if (buffer-live-p mu4e~view-buffer)
|
||||||
|
|||||||
Reference in New Issue
Block a user