Modify my/kill-some-buffers
This commit is contained in:
parent
a0249716b6
commit
e7392c6c09
4
init.el
4
init.el
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user