emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-29 b371697cdca: Minor change in 'dired--find-possibly-alternative-


From: Eli Zaretskii
Subject: emacs-29 b371697cdca: Minor change in 'dired--find-possibly-alternative-file'
Date: Tue, 28 Feb 2023 09:12:07 -0500 (EST)

branch: emacs-29
commit b371697cdca6069378c713ac8e36ec98b06c5cc3
Author: Felix <felix.dick@web.de>
Commit: Eli Zaretskii <eliz@gnu.org>

    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
---
 lisp/dired.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/dired.el b/lisp/dired.el
index 2bcb28a0e00..4a4ecc901c4 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -2728,7 +2728,8 @@ directory in another window."
 (defun dired--find-possibly-alternative-file (file)
   "Find FILE, but respect `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
         (set-buffer-modified-p nil)
         (dired--find-file #'find-alternate-file file))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]