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))))
|
(message "Killed %s buffers" n))))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###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
|
"Clean up buried buries and orphaned processes in the current workspace. If
|
||||||
ALL-P (universal argument), clean them up globally."
|
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))))
|
(let ((buffers (doom-buried-buffers (if all-p (buffer-list))))
|
||||||
(n 0)
|
(n 0)
|
||||||
kill-buffer-query-functions)
|
kill-buffer-query-functions)
|
||||||
(mapc #'kill-buffer buffers)
|
(mapc #'kill-buffer buffers)
|
||||||
(setq n (+ n (length buffers) (doom/cleanup-processes)))
|
(setq n (+ n (length buffers) (doom/cleanup-processes)))
|
||||||
(run-hooks 'doom-cleanup-hook)
|
(dolist (hook doom-cleanup-hook)
|
||||||
(when interactive-p
|
(setq n (+ n (or (funcall hook) 1))))
|
||||||
(message "Cleaned up %s buffers" n))
|
(message "Cleaned up %s buffers" n)
|
||||||
n))
|
n))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###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)
|
(cl-loop for buf in (buffer-list)
|
||||||
unless (persp--buffer-in-persps buf)
|
unless (persp--buffer-in-persps buf)
|
||||||
if (kill-buffer buf)
|
if (kill-buffer buf)
|
||||||
do (cl-incf n)))
|
sum 1))
|
||||||
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue