emacs-diffs
[Top][All Lists]
Advanced

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

master 8f0a2c8: Make subdirs . nil in dir-locals in ~/ work


From: Lars Ingebrigtsen
Subject: master 8f0a2c8: Make subdirs . nil in dir-locals in ~/ work
Date: Mon, 25 Jan 2021 19:12:53 -0500 (EST)

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

    Make subdirs . nil in dir-locals in ~/ work
    
    * lisp/files.el (dir-locals-collect-variables): Compare directory
    names after expanding.  This makes a (subdirs . nil) in ~/ work as
    expected (bug#17205).
    
    Test case:
    
    ((nil . ((a .  "hallo")
             (subdirs . nil))))
    
    in ~/
---
 lisp/files.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/files.el b/lisp/files.el
index 7af5549..77e3a3a 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -4068,7 +4068,7 @@ Return the new variables list."
                         ;; integer values for subdir, where N means
                         ;; variables apply to this directory and N levels
                         ;; below it (0 == nil).
-                        (equal root default-directory))
+                        (equal root (expand-file-name default-directory)))
                     (setq variables (dir-locals-collect-mode-variables
                                      alist variables))))))))
       (error



reply via email to

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