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: Juri Linkov
Subject: Re: Make all tree-sitter modes optional
Date: Wed, 15 Feb 2023 20:25:22 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu)

> How about commands c-make-ts-default-mode and c-make-ts-undefault-mode
> (and analogous functions for the other ts-modes)?  The first of these
> would push the new entries onto auto-mode-alist and the second would
> remove them again.  Or we could have a customisable option,
> c-default-c-mode which users could set when they are ready.  Either of
> these would allow the user to try out the new modes freely without being
> coerced against their will to use the new -ts- modes.

The proposed defcustom 'treesit-enable-modes' was supposed to have such
:set that would compare the old with new list of customized modes, then
for added modes like 'c-ts-mode' it could call (treesit-enable 'c-ts-mode),
and for removed modes (treesit-disable 'c-ts-mode).

Then for modes whose entries already exist in auto-mode-alist,
it will add/remove a mapping in major-mode-remap-alist.
For modes without an entry in auto-mode-alist, it will
update auto-mode-alist.



reply via email to

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