[Top][All Lists]

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

master 96f1fed: Fix problem with previous dired.el change

From: Lars Ingebrigtsen
Subject: master 96f1fed: Fix problem with previous dired.el change
Date: Wed, 16 Sep 2020 07:35:08 -0400 (EDT)

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

    Fix problem with previous dired.el change
    * lisp/dired.el (dired-get-filename): dired-current-directory
    can't be called before the dired buffer has been set up.
    (add-hook 'dired-mode-hook 'dired-sort-toggle) calls
    dired-get-filename in a way that exposes this problem, so avoid
 lisp/dired.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lisp/dired.el b/lisp/dired.el
index 1b6da1f..7839ace 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -2610,7 +2610,9 @@ it occurs in the buffer, and a value of t means construct 
name relative to
 Optional arg NO-ERROR-IF-NOT-FILEP means treat `.' and `..' as
 regular filenames and return nil if no filename on this line.
 Otherwise, an error occurs in these cases."
-  (let ((hidden (dired-subdir-hidden-p (dired-current-directory)))
+  (let ((hidden (and dired-subdir-alist
+                     (dired-subdir-hidden-p
+                      (dired-current-directory))))
        case-fold-search file p1 p2 already-absolute)
     (when hidden

reply via email to

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