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: Wed, 18 Jan 2023 05:52:14 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2

On 18/01/2023 05:34, Eli Zaretskii wrote:
Similarly, we can add such line to the Commentary of every ts mode, or even to 
the major mode docstrings
IF we do that, it’d be better to instruct users to use major-mode-remap-alist, 
since it’s easier to understand and use IMO.
Sure. This way we also avoid duplicating the file name regexp.
The purpose of major-mode-remap-alist doesn't fit such use, so this
proposal is a no-go.

Its NEWS entry says:

** New user option 'major-mode-remap-alist' to specify favorite major modes.
This user option lets you remap the default modes (e.g. 'perl-mode' or
'latex-mode') to your favorite ones (e.g. 'cperl-mode' or
'LaTeX-mode') without having to use 'defalias', which can have
undesirable side effects.

If we leave it to the user to add an entry to that variable, we don't have to worry whether tree-sitter support is compiled and the respective grammar is available -- the user can ensure that. So there will be no need for a treesit-available-p check.

Seems like a perfect fit.



reply via email to

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