bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#60176: 29.0.60; Fallback file variable mode if treesitter is not usa


From: Eli Zaretskii
Subject: bug#60176: 29.0.60; Fallback file variable mode if treesitter is not usable
Date: Tue, 10 Jan 2023 14:55:08 +0200

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: Eli Zaretskii <eliz@gnu.org>,  sadiq@sadiqpk.org,  60176@debbugs.gnu.org
> Date: Mon, 09 Jan 2023 18:06:17 -0500
> 
> >> The current syntax is rather
> >>
> >>     (setq major-mode-remap-alist '((c-mode . treesit-available-p 
> >> c-ts-mode)))
> >
> > Is it possible at least to make this forward-compatible to support
> > such a predicate in future?  To enable ts-modes only in some buffers
> > currently requires first to enable non-ts-mode, then conditionally ts-mode:
> 
> We can use:
> 
>     (setq (alist-get 'c-mode major-mode-remap-alist)
>           (lambda () (if (treesit-available-p) (c-ts-mode) (c-mode))))

Who is "we" here?

I don't want to do this by default, because we want users of Emacs 29
to turn on TS modes manually, if and when they want that and think
they are ready.

Of course, I don't mind if the above is done in local customizations
by users who are willing to use TS modes whenever they become
available.





reply via email to

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