]> git.eshelyaron.com Git - emacs.git/commit
Ensure .dir-locals-2.el behavior as documented (bug#75890)
authorshipmints <shipmints@gmail.com>
Sun, 16 Feb 2025 19:30:45 +0000 (14:30 -0500)
committerEshel Yaron <me@eshelyaron.com>
Sun, 23 Mar 2025 19:34:07 +0000 (20:34 +0100)
commitd1626c56949e26dbe4e5df1f34b902aca0b70d39
tree6cc8ca133d440ae4f1c7cae5af783439410f890d
parent87380dae42f2592cb8acb9d588baff75ef115643
Ensure .dir-locals-2.el behavior as documented (bug#75890)

* lisp/files.el
(dir-locals--all-files): New &optional 'base-el-only' argument.
(dir-locals--base-file): New function.
(dir-locals-find-file): 'locate-dominating-file' only for the base
.dir-locals.el.

* test/lisp/files-tests.el
(files-test-dir-locals-2-solo): New test.
* test/lisp/files-resources/dir-locals-2-solo: New test support.
(files-test-dir-locals-2-paired): New test.
* test/lisp/files-resources/dir-locals-and-2: New test support.

(cherry picked from commit 81c21d89ede8dfa664b7a3700acd7bf4c9fa54aa)
lisp/files.el
test/lisp/files-resources/dir-locals-2-solo/.dir-locals-2.el [new file with mode: 0644]
test/lisp/files-resources/dir-locals-2-solo/dir-locals-2-solo.txt [new file with mode: 0644]
test/lisp/files-resources/dir-locals-and-2/.dir-locals-2.el [new file with mode: 0644]
test/lisp/files-resources/dir-locals-and-2/.dir-locals.el [new file with mode: 0644]
test/lisp/files-resources/dir-locals-and-2/dir-locals-and-2.txt [new file with mode: 0644]
test/lisp/files-tests.el