mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-26 07:33:47 +00: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
6
etc/NEWS
6
etc/NEWS
@ -504,6 +504,12 @@ time zones will use a form like "+0100" instead of "CET".
|
||||
|
||||
** Dired
|
||||
|
||||
---
|
||||
*** Behaviour change on 'dired-clean-confirm-killing-deleted-buffers'.
|
||||
Previously, if 'dired-clean-up-buffers-too' was non-nil, and
|
||||
'dired-clean-confirm-killing-deleted-buffers' was nil, the buffers
|
||||
wouldn't be killed. This combination will now kill the buffers.
|
||||
|
||||
+++
|
||||
*** New user option 'dired-switches-in-mode-line'.
|
||||
This user option controls how 'ls' switches are displayed in the mode
|
||||
|
@ -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…
Reference in New Issue
Block a user