[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#8158: Definition of auto-mode-alist
From: |
Stefan Kangas |
Subject: |
bug#8158: Definition of auto-mode-alist |
Date: |
Thu, 21 Oct 2021 13:29:08 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> ;; Note: The entries for the modes defined in cc-mode.el (c-mode,
>> ;; c++-mode, java-mode and more) are added through autoload
>> ;; directives in that file. That way is discouraged since it
>> ;; spreads out the definition of the initial value.
>
>> Isn't this a bit unmodular as Emacs continues to grow, and given loaddefs.el?
>
> I agree, but I think Richard disagrees. Also, order of entries in
> auto-mode-alist can be important, so autoloading those entries does not
> work for all cases. But for 90% of the cases, it's perfectly fine and
> indeed we do use it already in several cases.
>
> Such ordering conflicts are difficult to detect automatically: detecting
> them when we compile Emacs requires checking which regexps overlap
> (which is perfectly doable in theory, but we'd need a "regexp-to-DFA
> compiler" for that, basically), detecting them at run-time is too late
> (often it'd be wrong to ask the user to resolve such conflicts).
Does anyone object to just removing the above comment? And similarly
for `interpreter-mode-alist', I suppose.
- bug#8158: Definition of auto-mode-alist,
Stefan Kangas <=