Modify my/kill-some-buffers

This commit is contained in:
Alexander Rosenberg 2024-11-07 22:06:44 -08:00
parent a0249716b6
commit e7392c6c09
Signed by: Zander671
GPG Key ID: 5FD0394ADBD72730

View File

@ -269,6 +269,7 @@ PRED is nil, the value of `my/kill-some-buffers-default-pred' is used."
;; we already ask, no need to do it again
(let ((kill-buffer-query-functions nil)
(all-action (when auto-unmod 'unmod))
(had-valid-buffer)
(ask-again-buffers)
(to-kill))
(cl-flet ((ask-about (buffer allow-unmod)
@ -312,7 +313,10 @@ PRED is nil, the value of `my/kill-some-buffers-default-pred' is used."
(dolist (buffer (buffer-list))
(when (and (not (my/kill-some-buffers-excluded-buffer-p buffer))
(funcall (or pred my/kill-some-buffers-default-pred) buffer))
(setq had-valid-buffer t)
(act-on (ask-about buffer t) buffer t)))
(unless had-valid-buffer
(message "Nothing to do..."))
(setq all-action nil)
(dolist (buffer ask-again-buffers)
(act-on (ask-about buffer nil) buffer nil))