Bury other windows in narf/kill-real-buffer
This commit is contained in:
parent
8060e6c8d1
commit
ddb7bf12d1
1 changed files with 8 additions and 1 deletions
|
@ -82,7 +82,14 @@ Inspired from http://demonastery.org/2013/04/emacs-evil-narrow-region/"
|
|||
(let ((bname (buffer-name)))
|
||||
(cond ((string-match-p "^\\*scratch\\*" bname)
|
||||
(erase-buffer))
|
||||
(t (kill-this-buffer))))
|
||||
(t ;; bury duplicate buffers in other windows
|
||||
(let ((this-window (get-buffer-window)))
|
||||
(mapc (lambda (w)
|
||||
(unless (eq this-window w)
|
||||
(with-selected-window w (narf/previous-real-buffer))))
|
||||
(get-buffer-window-list (current-buffer) nil nil)))
|
||||
;; Then kill
|
||||
(kill-this-buffer))))
|
||||
(if (narf/popup-p (current-buffer))
|
||||
(narf/popup-close)
|
||||
(unless (narf/real-buffer-p (current-buffer))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue