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

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

bug#58075: Mapping file types to major modes


From: Lars Ingebrigtsen
Subject: bug#58075: Mapping file types to major modes
Date: Mon, 26 Sep 2022 13:26:48 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Stefan Monnier <monnier@iro.umontreal.ca> 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.

> We could have
>
>     (add-to-list 'major-mode-remap-alist '(perl-mode . cperl-mode))

This area is already pretty complicated, so I worry that this is going
to make things even more confusing.  But perhaps it's worth it?






reply via email to

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