Subject: bug#33400: [PATCH] Let dir locals for more specific modes override those from less

From: Noam Postavsky <[email-masked]>
Date: Sat, 27 Apr 2019 14:05:51 -0400

Neil Roberts <[email-masked]> writes:

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

This patch looks basically good to me (some minor formatting: sentences
should end in double space, and the commit message misses a ChangeLog
formatted entry), but it exceeds to copyright exemption limit.  Would
you be willing to sign papers?