emacs-devel
[Top][All Lists]
Advanced

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

Re: Make all tree-sitter modes optional


From: Dmitry Gutov
Subject: Re: Make all tree-sitter modes optional
Date: Mon, 16 Jan 2023 01:39:18 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2

On 15/01/2023 16:01, Eli Zaretskii wrote:
You will
see that where possible, just loading a TS mode modifies
auto-mode-alist if the tree-sitter support for that mode is available,
whereas for other modes auto-mode-alist is modified only when the mode
is actually turned on successfully for the first time.  This is
because some of the TS modes have their own *.el files, whereas others
share a .el file with other modes, and so loading that file doesn't
necessarily means the user wants to use the tree-sitter based mode.

If we *are* going to do this (make all ts mode strictly optional), I don't think either of this is a good idea: for a given foo-ts-mode, the user might already have an auto-mode-alist entry configured with another mode (third-party or not), and they will likely 'M-x foo-ts-mode' to try how well it works (or doesn't).

Having auto-mode-alist modified automatically can come as a surprise either way.

Note the this is different to having the auto-mode-alist entries set up from the outset, because the user's alterations override those.

We can drop the auto-mode-alist alterations from ts modes altogether, to bring them back when we do decide to enable them by default.



reply via email to

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