[Top][All Lists]

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

master e98ca32: Make dired-buffers-for-dir expand the DIR argument

From: Lars Ingebrigtsen
Subject: master e98ca32: Make dired-buffers-for-dir expand the DIR argument
Date: Fri, 10 Dec 2021 06:33:45 -0500 (EST)

branch: master
commit e98ca32176871011451b04c0b952aef07d658f72
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Make dired-buffers-for-dir expand the DIR argument
    * lisp/dired.el (dired-buffers-for-dir): Expand DIR argument
    (dired-find-buffer-nocreate, dired-clean-up-after-deletion):
    Adjust callers.
 lisp/dired.el | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/lisp/dired.el b/lisp/dired.el
index d0e547b..4e2a32d 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -1265,8 +1265,7 @@ The return value is the target column for the file names."
            ;; Don't try to find a wildcard as a subdirectory.
           (string-equal dirname (file-name-directory dirname)))
       (let* ((cur-buf (current-buffer))
-            (buffers (nreverse
-                      (dired-buffers-for-dir (expand-file-name dirname))))
+            (buffers (nreverse (dired-buffers-for-dir dirname)))
             (cur-buf-matches (and (memq cur-buf buffers)
                                   ;; Wildcards must match, too:
                                   (equal dired-directory dirname))))
@@ -2967,7 +2966,7 @@ directories below DIR.
 The list is in reverse order of buffer creation, most recent last.
 As a side effect, killed dired buffers for DIR are removed from
-  (setq dir (file-name-as-directory dir))
+  (setq dir (file-name-as-directory (expand-file-name dir)))
   (let (result buf)
     (dolist (elt dired-buffers)
       (setq buf (cdr elt))
@@ -3518,7 +3517,7 @@ If the buffer has a wildcard pattern, check that it 
matches FILE.
 FILE may be nil, in which case ignore it.
 Return list of buffers where FUN succeeded (i.e., returned non-nil)."
   (let (success-list)
-    (dolist (buf (dired-buffers-for-dir (expand-file-name directory) file))
+    (dolist (buf (dired-buffers-for-dir directory file))
       (with-current-buffer buf
        (when (apply fun args)
          (push (buffer-name buf) success-list))))
@@ -3567,8 +3566,7 @@ confirmation.  To disable the confirmation, see
                                      (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)
-                                           nil 'subdirs)))
+    (let ((buf-list (dired-buffers-for-dir fn nil 'subdirs)))
       (and buf-list
            (or (and dired-clean-confirm-killing-deleted-buffers

reply via email to

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