GNU bug report logs -
#60176
29.0.60; Fallback file variable mode if treesitter is not usable
Previous Next
Reported by: Mohammed Sadiq <sadiq <at> sadiqpk.org>
Date: Sun, 18 Dec 2022 12:08:01 UTC
Severity: normal
Tags: notabug, wontfix
Merged with 60559,
60874
Found in version 29.0.60
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #40 received at 60176 <at> debbugs.gnu.org (full text, mbox):
> From: Stefan Monnier <monnier <at> iro.umontreal.ca>
> Cc: Eli Zaretskii <eliz <at> gnu.org>, sadiq <at> sadiqpk.org, 60176 <at> 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.
This bug report was last modified 2 years and 118 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.