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
|
;; we already ask, no need to do it again
|
||||||
(let ((kill-buffer-query-functions nil)
|
(let ((kill-buffer-query-functions nil)
|
||||||
(all-action (when auto-unmod 'unmod))
|
(all-action (when auto-unmod 'unmod))
|
||||||
|
(had-valid-buffer)
|
||||||
(ask-again-buffers)
|
(ask-again-buffers)
|
||||||
(to-kill))
|
(to-kill))
|
||||||
(cl-flet ((ask-about (buffer allow-unmod)
|
(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))
|
(dolist (buffer (buffer-list))
|
||||||
(when (and (not (my/kill-some-buffers-excluded-buffer-p buffer))
|
(when (and (not (my/kill-some-buffers-excluded-buffer-p buffer))
|
||||||
(funcall (or pred my/kill-some-buffers-default-pred) buffer))
|
(funcall (or pred my/kill-some-buffers-default-pred) buffer))
|
||||||
|
(setq had-valid-buffer t)
|
||||||
(act-on (ask-about buffer t) buffer t)))
|
(act-on (ask-about buffer t) buffer t)))
|
||||||
|
(unless had-valid-buffer
|
||||||
|
(message "Nothing to do..."))
|
||||||
(setq all-action nil)
|
(setq all-action nil)
|
||||||
(dolist (buffer ask-again-buffers)
|
(dolist (buffer ask-again-buffers)
|
||||||
(act-on (ask-about buffer nil) buffer nil))
|
(act-on (ask-about buffer nil) buffer nil))
|
||||||
|
Loading…
Reference in New Issue
Block a user