Fix narf:kill-buried-buffers and narf/get-buried-buffers
This commit is contained in:
parent
5f76c92334
commit
90d5fca299
1 changed files with 5 additions and 5 deletions
|
@ -68,7 +68,7 @@ Inspired from http://demonastery.org/2013/04/emacs-evil-narrow-region/"
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun narf/get-buried-buffers (&optional buffer-list)
|
(defun narf/get-buried-buffers (&optional buffer-list)
|
||||||
"Get a list of buffers that are buried (i.e. not visible)"
|
"Get a list of buffers that are buried (i.e. not visible)"
|
||||||
(-filter #'get-buffer-window (or buffer-list (narf/get-buffers))))
|
(--filter (not (get-buffer-window it)) (or buffer-list (narf/get-buffers))))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun narf/get-matching-buffers (pattern &optional buffer-list)
|
(defun narf/get-matching-buffers (pattern &optional buffer-list)
|
||||||
|
@ -78,7 +78,7 @@ Inspired from http://demonastery.org/2013/04/emacs-evil-narrow-region/"
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun narf/get-real-buffers (&optional buffer-list)
|
(defun narf/get-real-buffers (&optional buffer-list)
|
||||||
(-filter 'narf/real-buffer-p (or buffer-list (narf/get-buffers))))
|
(-filter #'narf/real-buffer-p (or buffer-list (narf/get-buffers))))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun narf:kill-unreal-buffers ()
|
(defun narf:kill-unreal-buffers ()
|
||||||
|
@ -167,9 +167,9 @@ left, create a scratch buffer."
|
||||||
(evil-define-command narf:kill-buried-buffers (&optional bang)
|
(evil-define-command narf:kill-buried-buffers (&optional bang)
|
||||||
:repeat nil
|
:repeat nil
|
||||||
(interactive "<!>")
|
(interactive "<!>")
|
||||||
(narf:kill-buried-buffers)
|
(let ((buffers (narf/get-buried-buffers (if bang (projectile-project-buffers) (narf/get-buffers)))))
|
||||||
(mapc 'kill-buffer
|
(message "Cleaned up %s buffers" (length buffers))
|
||||||
(narf/get-buried-buffers (if bang (projectile-project-buffers) (narf/get-buffers)))))
|
(mapc 'kill-buffer buffers)))
|
||||||
|
|
||||||
;;;###autoload (autoload 'narf:kill-all-buffers "defuns-buffers" nil t)
|
;;;###autoload (autoload 'narf:kill-all-buffers "defuns-buffers" nil t)
|
||||||
(evil-define-command narf:kill-all-buffers (&optional bang)
|
(evil-define-command narf:kill-all-buffers (&optional bang)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue