Fix doom/cleanup-session & +workspaces|cleanup-unassociated-buffers
Resolve void n variable errors and silent message.
This commit is contained in:
parent
8ef3cf8ea7
commit
88f8c27a7d
2 changed files with 6 additions and 6 deletions
|
@ -242,18 +242,18 @@ project."
|
|||
(message "Killed %s buffers" n))))
|
||||
|
||||
;;;###autoload
|
||||
(defun doom/cleanup-session (&optional all-p interactive-p)
|
||||
(defun doom/cleanup-session (&optional all-p)
|
||||
"Clean up buried buries and orphaned processes in the current workspace. If
|
||||
ALL-P (universal argument), clean them up globally."
|
||||
(interactive (list current-prefix-arg 'interactive))
|
||||
(interactive (list current-prefix-arg))
|
||||
(let ((buffers (doom-buried-buffers (if all-p (buffer-list))))
|
||||
(n 0)
|
||||
kill-buffer-query-functions)
|
||||
(mapc #'kill-buffer buffers)
|
||||
(setq n (+ n (length buffers) (doom/cleanup-processes)))
|
||||
(run-hooks 'doom-cleanup-hook)
|
||||
(when interactive-p
|
||||
(message "Cleaned up %s buffers" n))
|
||||
(dolist (hook doom-cleanup-hook)
|
||||
(setq n (+ n (or (funcall hook) 1))))
|
||||
(message "Cleaned up %s buffers" n)
|
||||
n))
|
||||
|
||||
;;;###autoload
|
||||
|
|
|
@ -525,7 +525,7 @@ Ensures the scratch (or dashboard) buffers are CDed into the project's root."
|
|||
(cl-loop for buf in (buffer-list)
|
||||
unless (persp--buffer-in-persps buf)
|
||||
if (kill-buffer buf)
|
||||
do (cl-incf n)))
|
||||
sum 1))
|
||||
|
||||
|
||||
;;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue