mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-16 17:24:23 +00:00
Fix dired confirm message asking to kill buffers of deleted dir (bug#48301)
* lisp/dired.el (dired-clean-up-after-deletion): Fix dired confirmation message asking to kill buffers of deleted dir in the case where `dired-listing-switches' contain -p (bug#48301).
This commit is contained in:
parent
fa9f61e0f6
commit
4e175604b5
1 changed files with 10 additions and 5 deletions
|
|
@ -3425,11 +3425,16 @@ confirmation. To disable the confirmation, see
|
|||
(let ((buf-list (dired-buffers-for-dir (expand-file-name fn))))
|
||||
(and buf-list
|
||||
(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))))
|
||||
(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 may end in a / if `dired-listing-switches'
|
||||
;; contains -p, so we need to strip that
|
||||
;; (bug#48301).
|
||||
(directory-file-name fn)))))
|
||||
(not dired-clean-confirm-killing-deleted-buffers))
|
||||
(dolist (buf buf-list)
|
||||
(kill-buffer buf))))))
|
||||
|
|
|
|||
Loading…
Reference in a new issue