Refactor doom/kill-*-buffer commands

This commit is contained in:
Henrik Lissner 2019-10-10 12:34:10 -04:00
parent 400dae27cd
commit a3fa1e07b1
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
3 changed files with 61 additions and 55 deletions

View file

@ -143,14 +143,15 @@ This command understands vim file modifiers (like %:p:h). See
(interactive "<!>")
(if (and bang (fboundp '+workspace/kill-session))
(+workspace/kill-session)
(doom/kill-all-buffers)))
(call-interactively #'doom/kill-all-buffers)))
;;;###autoload (autoload '+evil:kill-matching-buffers "editor/evil/autoload/ex" nil t)
(evil-define-command +evil:kill-matching-buffers (&optional bang pattern)
"Kill all buffers matching PATTERN regexp. If BANG, only match project
buffers."
(interactive "<a>")
(doom/kill-matching-buffers pattern bang))
(doom/kill-matching-buffers
pattern (if bang (doom-project-buffer-list))))
;;;###autoload (autoload '+evil:help "editor/evil/autoload/ex" nil t)
(evil-define-command +evil:help (&optional bang query)