emacs-devel
[Top][All Lists]
Advanced

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

Re: Subversion of user chosen major mode by Emacs.


From: Dmitry Gutov
Subject: Re: Subversion of user chosen major mode by Emacs.
Date: Thu, 30 May 2024 01:10:04 +0300
User-agent: Mozilla Thunderbird

Hi Alan,

On 29/05/2024 22:22, Alan Mackenzie wrote:

I've just had a look at that commit, and it simply adds entries to
auto-mode-alist for the *-ts-mode modes in the traditional, normal and
acceptable fashion.  CC Mode does the same.

That's not the same thing: all CC Mode entries are behind ###autoload,
meaning that the alist does not actually change when you load the file
(as long as the autoloads are properly generated when you build Emacs).

Ah yes, you're right.  The entries to auto-mode-alist in cc-mode.el are
in comments (autoload comments), so that's one reason loading CC Mode
doesn't put those entries to the top of the alist.

To be honest, I'm surprised that c-ts-mode and friends haven't come to
have autoload entries for auto-mode-alist, superseding those in CC Mode.
Perhaps if this had been done, the unpleasantness caused by
major-mode-remap-alist/defaults could have been avoided.

IIUC, the current state of affairs is an attempt to balance the needs of users who want to test out and use the tree-sitter modes with as little friction as possible, against the needs of older users who can get annoyed at the switch in the defaults (and the extra work required to install the tree-sitter libraries, bug#60559).



reply via email to

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