]> git.eshelyaron.com Git - emacs.git/commitdiff
Make (subdirs . nil) in .dir-locals.el work
authorLars Ingebrigtsen <larsi@gnus.org>
Sat, 23 Jan 2021 22:12:05 +0000 (23:12 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Sat, 23 Jan 2021 22:12:05 +0000 (23:12 +0100)
* lisp/files.el (dir-locals-collect-variables): Don't
destructively modify the cached structure (bug#17205), because
that means that (subdirs . nil) doesn't work.

lisp/files.el

index d2e5413b3ad81f63ab29e6572ca4995cf61c0fc8..7af5549bcb098ee607eda29393ee4a3e832826eb 100644 (file)
@@ -4062,7 +4062,7 @@ Return the new variables list."
                      (subdirs (assq 'subdirs alist)))
                 (if (or (not subdirs)
                         (progn
-                          (setq alist (delq subdirs alist))
+                          (setq alist (remq subdirs alist))
                           (cdr-safe subdirs))
                         ;; TODO someone might want to extend this to allow
                         ;; integer values for subdir, where N means