Minor change in 'dired--find-possibly-alternative-file'
* lisp/dired.el (dired--find-possibly-alternative-file): Don't kill the buffer if the directory is shown in other windows. Copyright-paperwork-exempt: yes
This commit is contained in:
parent
c2b5c6acc5
commit
b371697cdc
1 changed files with 2 additions and 1 deletions
|
@ -2728,7 +2728,8 @@ directory in another window."
|
||||||
(defun dired--find-possibly-alternative-file (file)
|
(defun dired--find-possibly-alternative-file (file)
|
||||||
"Find FILE, but respect `dired-kill-when-opening-new-dired-buffer'."
|
"Find FILE, but respect `dired-kill-when-opening-new-dired-buffer'."
|
||||||
(if (and dired-kill-when-opening-new-dired-buffer
|
(if (and dired-kill-when-opening-new-dired-buffer
|
||||||
(file-directory-p file))
|
(file-directory-p file)
|
||||||
|
(< (length (get-buffer-window-list)) 2))
|
||||||
(progn
|
(progn
|
||||||
(set-buffer-modified-p nil)
|
(set-buffer-modified-p nil)
|
||||||
(dired--find-file #'find-alternate-file file))
|
(dired--find-file #'find-alternate-file file))
|
||||||
|
|
Loading…
Add table
Reference in a new issue