]> git.eshelyaron.com Git - emacs.git/commitdiff
Ignore .dir-locals-2.el files more
authorLars Ingebrigtsen <larsi@gnus.org>
Sun, 4 Jul 2021 14:23:46 +0000 (16:23 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Sun, 4 Jul 2021 14:23:46 +0000 (16:23 +0200)
* lisp/emacs-lisp/shadow.el (load-path-shadows-find):
* lisp/emacs-lisp/bytecomp.el (byte-recompile-directory): Ignore
.dir-locals-2.el, too (bug#23257).

lisp/emacs-lisp/bytecomp.el
lisp/emacs-lisp/shadow.el

index 3e65db42421be4a78036184900bba6c1b6e7d186..70999648d47eb43461837623c221a906b216b489 100644 (file)
@@ -1857,8 +1857,7 @@ also be compiled."
                         (file-readable-p source)
                        (not (string-match "\\`\\.#" file))
                         (not (auto-save-file-name-p source))
-                        (not (string-equal dir-locals-file
-                                           (file-name-nondirectory source))))
+                        (not (member source (dir-locals--all-files directory))))
                    (progn (cl-incf
                            (pcase (byte-recompile-file source force arg)
                              ('no-byte-compile skip-count)
index c1d0594123944711167e08e1a41953754d71e8e6..02f2ad3d8162b98171f43a3011b3f46276ed5a1e 100644 (file)
@@ -115,9 +115,12 @@ See the documentation for `list-load-path-shadows' for further information."
          ;; FILE now contains the current file name, with no suffix.
          (unless (or (member file files-seen-this-dir)
                      ;; Ignore these files.
-                     (member file (list "subdirs" "leim-list"
-                                        (file-name-sans-extension
-                                         dir-locals-file))))
+                     (member file
+                              (list "subdirs" "leim-list"
+                                   (file-name-sans-extension dir-locals-file)
+                                    (concat
+                                    (file-name-sans-extension dir-locals-file)
+                                     "-2"))))
            ;; File has not been seen yet in this directory.
            ;; This test prevents us declaring that XXX.el shadows
            ;; XXX.elc (or vice-versa) when they are in the same directory.