* mu4e-utils.el: improve mu4e-quit-buffer (bury-buffer)

This commit is contained in:
djcb 2012-06-12 00:15:06 +03:00
parent 46a6b445b3
commit a4bef96620
1 changed files with 19 additions and 15 deletions

View File

@ -779,6 +779,7 @@ is ignored."
(defun mu4e-quit-buffer ()
"Bury the current buffer (and delete all windows displaying it)."
(interactive)
(let ((buf (current-buffer)))
(walk-windows
;; kill any window that:
;; a) displays the current buffer
@ -786,7 +787,10 @@ is ignored."
(lambda (win)
(when (eq (window-buffer win) (current-buffer))
(unless (one-window-p t)
(delete-window win)))) nil t))
(delete-window win)))) nil t)
;; if current buffer is still here, bury it
(when (eq buf (current-buffer))
(bury-buffer))))
(defun mu4e-hide-other-mu4e-buffers ()