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 ~/
This commit is contained in:
Lars Ingebrigtsen 2021-01-26 01:12:45 +01:00
parent 49e01d85ed
commit 8f0a2c84b6

View file

@ -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