1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-08 04:30:45 -08:00
emacs/doc
Neil Roberts 02bee7860f 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.
2019-05-12 09:59:55 -04:00
..
emacs Let dir locals for more specific modes override those from less 2019-05-12 09:59:55 -04:00
lispintro Minor spelling and grammar fixes (bug#34756) 2019-03-05 20:24:41 +00:00
lispref Fix description of (move-to-column <n> t) when column <n> is inside a tab 2019-05-09 16:27:03 +00:00
man Update copyright year to 2019 2019-01-01 01:01:13 +00:00
misc Fix markup related to quoting in Info 2019-04-21 14:56:04 +03:00