* mu4e-utils.el: improve mu4e-quit-buffer (bury-buffer)
This commit is contained in:
@ -779,14 +779,18 @@ is ignored."
|
|||||||
|
|
||||||
(defun mu4e-quit-buffer ()
|
(defun mu4e-quit-buffer ()
|
||||||
"Bury the current buffer (and delete all windows displaying it)."
|
"Bury the current buffer (and delete all windows displaying it)."
|
||||||
(interactive)
|
(interactive)
|
||||||
(walk-windows
|
(let ((buf (current-buffer)))
|
||||||
;; kill any window that:
|
(walk-windows
|
||||||
;; a) displays the current buffer
|
;; kill any window that:
|
||||||
;; b) is not the only win
|
;; a) displays the current buffer
|
||||||
(lambda (win)
|
;; b) is not the only win
|
||||||
(when (eq (window-buffer win) (current-buffer))
|
(lambda (win)
|
||||||
(unless (one-window-p t)
|
(when (eq (window-buffer win) (current-buffer))
|
||||||
|
(unless (one-window-p t)
|
||||||
|
(delete-window win)))) nil t)
|
||||||
|
;; if current buffer is still here, bury it
|
||||||
|
(when (eq buf (current-buffer))
|
||||||
(bury-buffer))))
|
(bury-buffer))))
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user