From: Lars Ingebrigtsen Date: Tue, 26 Jan 2021 00:12:45 +0000 (+0100) Subject: Make subdirs . nil in dir-locals in ~/ work X-Git-Tag: emacs-28.0.90~4118 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8f0a2c84b66ff8d45a9d088a181617417115ec9e;p=emacs.git 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 ~/ --- diff --git a/lisp/files.el b/lisp/files.el index 7af5549bcb0..77e3a3a834c 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