narf/kill-real-buffer compatibility with popwin

This commit is contained in:
Henrik Lissner 2015-10-13 00:46:47 -04:00
parent be03e48ffe
commit b878a52df8

View File

@ -87,8 +87,11 @@ Inspired from http://demonastery.org/2013/04/emacs-evil-narrow-region/"
(cond ((string-match-p "^\\*scratch\\*" bname)
(erase-buffer))
(t (kill-this-buffer))))
(unless (narf/real-buffer-p (current-buffer))
(narf/previous-real-buffer)))
(if (and (eq (current-buffer) popwin:popup-buffer)
(popwin:popup-window-live-p))
(popwin:close-popup-window)
(unless (narf/real-buffer-p (current-buffer))
(narf/previous-real-buffer))))
;;;###autoload
(defun narf:kill-unreal-buffers ()