Subject: Re: bug#74339: 30.0.92; CC Mode stomps C TS Mode

From: Eli Zaretskii <[email-masked]>
Date: Thu, 14 Nov 2024 21:10:03 +0200

> From: Stefan Monnier <[email-masked]>
> Cc: [email-masked],  [email-masked],  [email-masked]
> Date: Thu, 14 Nov 2024 12:16:38 -0500
> 
> AFAIC, "the way for users to express their preference" is by customizing
> `major-mode-remap-alist`

This is not a user-friendly method, IMNSHO.  Customizing
major-mode-remap-alist requires too much knowledge of Lisp.  How hard
is it to imagine someone who puts wrongly-formatted elements into the
alist, like sub-lists instead of cons cells?

If the user just wants to tell Emacs: I want to use foo-ts-mode
instead of foo-mode for language foo, there must be an easier way,
like flipping some simple switch.

So customizing major-mode-remap-alist is _a_ way to express this kind
of preferences, but IMO we should be able to do better.

In another discussion, I proposed to have simpler user option(s) that
would allow users to express this preference, such that, say,
auto-mode-alist would activate this or that mode given such a
variable.  I hope something like that will be possible in some future
release.