Ignore .dir-locals-2.el files more

* 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).
This commit is contained in:
Lars Ingebrigtsen 2021-07-04 16:23:46 +02:00
parent 2f2afa0b31
commit ed15f3954c
2 changed files with 7 additions and 5 deletions

View 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.