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:
Foivos S. Zakkak 2015-06-07 13:56:02 +03:00
parent b4d371de53
commit 2cf741e996
1 changed files with 5 additions and 4 deletions

View File

@ -400,16 +400,17 @@ the appropriate flag at the message forwarded or replied-to."
;; this seems a bit hamfisted...
(dolist (buf (buffer-list))
(when (and (buffer-file-name buf)
(string= (buffer-file-name buf) path)
message-kill-buffer-on-exit)
(string= (buffer-file-name buf) path))
(if (and mu4e-compose-in-new-frame (window-system))
(progn
(switch-to-buffer buf)
(when (and (get-buffer-window buf)
(window-frame (get-buffer-window buf)))
(kill-buffer 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
;; view->headers->main
(if (buffer-live-p mu4e~view-buffer)