Fix doom-cleanup-hook breaking if hook didn't return an integer
This commit is contained in:
parent
8f9175c25e
commit
4bd74d9653
1 changed files with 3 additions and 1 deletions
|
@ -252,7 +252,9 @@ ALL-P (universal argument), clean them up globally."
|
||||||
(mapc #'kill-buffer buffers)
|
(mapc #'kill-buffer buffers)
|
||||||
(setq n (+ n (length buffers) (doom/cleanup-processes)))
|
(setq n (+ n (length buffers) (doom/cleanup-processes)))
|
||||||
(dolist (hook doom-cleanup-hook)
|
(dolist (hook doom-cleanup-hook)
|
||||||
(setq n (+ n (or (funcall hook) 1))))
|
(let ((m (funcall hook)))
|
||||||
|
(when (integerp m)
|
||||||
|
(setq n (+ n m)))))
|
||||||
(message "Cleaned up %s buffers" n)
|
(message "Cleaned up %s buffers" n)
|
||||||
n))
|
n))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue