[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Make all tree-sitter modes optional
From: |
Eli Zaretskii |
Subject: |
Re: Make all tree-sitter modes optional |
Date: |
Wed, 18 Jan 2023 14:06:16 +0200 |
> Date: Wed, 18 Jan 2023 05:52:14 +0200
> Cc: casouri@gmail.com, monnier@iro.umontreal.ca, larsi@gnus.org,
> theo@thornhill.no, jostein@secure.kjonigsen.net, emacs-devel@gnu.org
> From: Dmitry Gutov <dgutov@yandex.ru>
>
> 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.
We can _suggest_ using that variable for this particular purpose, but
we cannot make it the only or even the main means of dealing with the
issue: this is a _user_ variable, and users can have needs or reasons
to do stuff with it that are incompatible with the kind of usage
proposed here.
- Re: Make all tree-sitter modes optional, (continued)
- Re: Make all tree-sitter modes optional, Eli Zaretskii, 2023/01/17
- Re: Make all tree-sitter modes optional, Dmitry Gutov, 2023/01/17
- Re: Make all tree-sitter modes optional, Eli Zaretskii, 2023/01/17
- Re: Make all tree-sitter modes optional, Dmitry Gutov, 2023/01/17
- Re: Make all tree-sitter modes optional, Eli Zaretskii, 2023/01/17
- Re: Make all tree-sitter modes optional, Dmitry Gutov, 2023/01/17
- Re: Make all tree-sitter modes optional, Yuan Fu, 2023/01/17
- Re: Make all tree-sitter modes optional, Dmitry Gutov, 2023/01/17
- Re: Make all tree-sitter modes optional, Eli Zaretskii, 2023/01/17
- Re: Make all tree-sitter modes optional, Dmitry Gutov, 2023/01/17
- Re: Make all tree-sitter modes optional,
Eli Zaretskii <=
- Re: Make all tree-sitter modes optional, Dmitry Gutov, 2023/01/18
- Re: Make all tree-sitter modes optional, Eli Zaretskii, 2023/01/18
- Re: Make all tree-sitter modes optional, Stefan Monnier, 2023/01/18
- treesit-forward-sexp (was: Make all tree-sitter modes optional), Juri Linkov, 2023/01/17
- Re: treesit-forward-sexp (was: Make all tree-sitter modes optional), Theodor Thornhill, 2023/01/17
- Re: treesit-forward-sexp, Juri Linkov, 2023/01/17
- Re: treesit-forward-sexp (was: Make all tree-sitter modes optional), Dmitry Gutov, 2023/01/17
- Re: treesit-forward-sexp (was: Make all tree-sitter modes optional), Eli Zaretskii, 2023/01/17
Re: Make all tree-sitter modes optional, Po Lu, 2023/01/15
Re: Make all tree-sitter modes optional, Juri Linkov, 2023/01/17