bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#64415: [PATCH] Use first match in dir-local `auto-mode-alist'


From: Shynur Xie
Subject: bug#64415: [PATCH] Use first match in dir-local `auto-mode-alist'
Date: Sun, 2 Jul 2023 11:16:17 +0000

GNU Emacs Manual, 49.2.5 Per-Directory Local Variables:

> The special key auto-mode-alist in a .dir-locals.el ... works much
> like the variable auto-mode-alist (see Choosing File Modes).

GNU Emacs Lisp Reference Manual, 24.2.2 How Emacs Chooses a Major
Mode:

> If auto-mode-alist has more than one element whose regexp matches
> the file name, Emacs will use the first match.

___

> Eli> Isn't that an incompatible change in long-time behavior?

That is a bug fix.  What do you mean by ‘long-time behavior’?  To be
honest, it is a long-time bug IMO.

> Eli> someone else, who relies on the current behavior, will not be.

Yes, so just let them know that this behavior has changed in NEWS.
They just need to reverse their original alist, is that very
difficult?  Not to mention that the original behavior was not
guaranteed at all.

You can of course refuse that patch, and the inconsistency between
‘auto-mode-alist’ and dir-local ‘auto-mode-alist’ will last forever.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]