mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
Fix doom-cleanup-hook breaking if hook didn't return an integer
This commit is contained in:
@ -252,7 +252,9 @@ ALL-P (universal argument), clean them up globally."
|
||||
(mapc #'kill-buffer buffers)
|
||||
(setq n (+ n (length buffers) (doom/cleanup-processes)))
|
||||
(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)
|
||||
n))
|
||||
|
||||
|
Reference in New Issue
Block a user