mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
Fix interaction between two dired cleanup variables
* lisp/dired.el (dired-clean-up-after-deletion): Kill the buffers if you have `dired-clean-up-buffers-too' set and `dired-clean-confirm-killing-deleted-buffers' nil (bug#38037). Copyright-paperwork-exempt: yes
This commit is contained in:
parent
0fa2a715d4
commit
cc2d3a62c2
2 changed files with 18 additions and 9 deletions
|
|
@ -3532,18 +3532,21 @@ confirmation. To disable the confirmation, see
|
|||
(when (and (featurep 'dired-x) dired-clean-up-buffers-too)
|
||||
(let ((buf (get-file-buffer fn)))
|
||||
(and buf
|
||||
(and dired-clean-confirm-killing-deleted-buffers
|
||||
(funcall #'y-or-n-p
|
||||
(format "Kill buffer of %s, too? "
|
||||
(file-name-nondirectory fn))))
|
||||
(or (and dired-clean-confirm-killing-deleted-buffers
|
||||
(funcall #'y-or-n-p
|
||||
(format "Kill buffer of %s, too? "
|
||||
(file-name-nondirectory fn))))
|
||||
(not dired-clean-confirm-killing-deleted-buffers))
|
||||
(kill-buffer buf)))
|
||||
(let ((buf-list (dired-buffers-for-dir (expand-file-name fn))))
|
||||
(and buf-list
|
||||
(and dired-clean-confirm-killing-deleted-buffers
|
||||
(y-or-n-p (format (ngettext "Kill Dired buffer of %s, too? "
|
||||
"Kill Dired buffers of %s, too? "
|
||||
(length buf-list))
|
||||
(file-name-nondirectory fn))))
|
||||
(or (and dired-clean-confirm-killing-deleted-buffers
|
||||
(y-or-n-p (format
|
||||
(ngettext "Kill Dired buffer of %s, too? "
|
||||
"Kill Dired buffers of %s, too? "
|
||||
(length buf-list))
|
||||
(file-name-nondirectory fn))))
|
||||
(not dired-clean-confirm-killing-deleted-buffers))
|
||||
(dolist (buf buf-list)
|
||||
(kill-buffer buf))))))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue