Subject: bug#58075: Mapping file types to major modes

From: Stefan Monnier <[email-masked]>
Date: Mon, 26 Sep 2022 08:13:34 -0400

Lars Ingebrigtsen [2022-09-26 13:26:48] wrote:
> Stefan Monnier <[email-masked]> writes:
>> We have various ways to deal with those different cases, which are
>> variously convenient/successful, but for things like `cperl-mode` vs
>> `perl-mode` or `latex-mode` vs AUCTeX the usual solution is not
>> satisfactory since it looks like:
>>
>>     (defalias 'perl-mode #'cperl-mode)
>
> Isn't the usual solution to just make `auto-mode-alist' map .pl to
> cperl-mode instead of perl-mode?
>
> Hm, well, that's
>
>      ("\\.\\([pP]\\([Llm]\\|erl\\|od\\)\\|al\\)\\'" . perl-mode)
>
> so it's a bit of a mouthful.

And that doesn't account for the files where the mode is found by
`interpreter-mode-list`, by `mode:` cookies, etc...

        Stefan