summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNeil Roberts <bpeeluk@yahoo.co.uk>2019-05-10 12:57:28 +0200
committerNoam Postavsky <npostavs@gmail.com>2019-05-12 09:59:55 -0400
commit02bee7860f7e650ef13e00fe1a7f9a362e3eb001 (patch)
tree33546f9e230f8906a26c8af65d692e9f701d9d16 /src
parentb1235f9abd0f255ff65e13b18ef3ee4e19278484 (diff)
downloademacs-02bee7860f7e650ef13e00fe1a7f9a362e3eb001.tar.gz
Let dir locals for more specific modes override those from less
The list of dir local variables to apply is now sorted by the number of parent modes of the mode used as the key in the association list. That way when the variables are applied in order the variables from more specific modes will override those from less specific modes. If there are directory entries in the list then they are sorted in order of name length. The list of modes for that dir is then recursively sorted with the same mechanism. That way variables tied to a particular subdirectory override those in in a parent directory. Previously the behaviour didn’t seem to be well defined anyway and was dependent on the order they appeared in the file. However this order was changed in version 26.1 and it probably also depended on the number of dir-local files that are merged. Bug#33400 * lisp/files.el (dir-locals-get-sort-score, dir-locals-sort-variables) (dir-locals-read-from-dir): Sort the dir locals so that more precise modes and directory-specific entries have override lesser ones. * doc/emacs/custom.texi (Directory Variables): Document the priority.
Diffstat (limited to 'src')
0 files changed, 0 insertions, 0 deletions