Refactor doom/kill-*-buffer commands
This commit is contained in:
parent
400dae27cd
commit
a3fa1e07b1
3 changed files with 61 additions and 55 deletions
|
@ -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)
|
||||
|
|
|
@ -263,7 +263,7 @@ workspace to delete."
|
|||
(+workspace-switch +workspaces-main t)
|
||||
(unless (string= (car workspaces) +workspaces-main)
|
||||
(+workspace-delete name))
|
||||
(doom/kill-all-buffers)))
|
||||
(doom/kill-all-buffers (doom-buffer-list))))
|
||||
(+workspace-message (format "Deleted '%s' workspace" name) 'success)))
|
||||
('error (+workspace-error ex t))))
|
||||
|
||||
|
@ -274,7 +274,7 @@ workspace to delete."
|
|||
(unless (cl-every #'+workspace-delete (+workspace-list-names))
|
||||
(+workspace-error "Could not clear session"))
|
||||
(+workspace-switch +workspaces-main t)
|
||||
(doom/kill-all-buffers))
|
||||
(doom/kill-all-buffers (buffer-list)))
|
||||
|
||||
;;;###autoload
|
||||
(defun +workspace/kill-session-and-quit ()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue