Use different function for :cleanup

This commit is contained in:
Henrik Lissner 2017-06-27 23:18:32 +02:00
parent a7dc91e7bf
commit 510e7116c8
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
3 changed files with 14 additions and 3 deletions

View file

@ -357,6 +357,17 @@ the workspace and move to the next."
((> (length (+workspace-list)) 1)
(+workspace/delete current-persp-name))))))
;;;###autoload
(defun +workspace/cleanup ()
"Clean up orphaned buffers and processes."
(interactive)
(let ((buffers (cl-remove-if #'persp--buffer-in-persps (buffer-list)))
(n (doom-kill-process-buffers)))
(mapc #'kill-buffer buffers)
(when (called-interactively-p 'any)
(message "Cleaned up %d buffers and %d processes"
(length buffers) n))))
;;
;; Tabs display in minibuffer