emacs-devel
[Top][All Lists]
Advanced

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

Re: Unifying "foo-mode"s and "foo-ts-mode"s


From: Eli Zaretskii
Subject: Re: Unifying "foo-mode"s and "foo-ts-mode"s
Date: Tue, 03 Jan 2023 14:11:27 +0200

> From: Richard Stallman <rms@gnu.org>
> Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org
> Date: Mon, 02 Jan 2023 23:07:49 -0500
> 
>   > And the features based on tree-sitter are not limited to
>   > fontifications, they also support indentation, navigation by defun and
>   > other language-dependent program components, and Imenu indices of
>   > functions, structures, etc.  Each one of these needs to change quite a
>   > few functions and variables of the particular major mode to switch
>   > between tree-sitter and the "traditional" ways, and we also needed to
>   > introduce a lot of new data structures that are not needed for the
>   > "traditional" modes.
> 
> I know.  I don't think that precludes having tree-sitter be a minor
> mode.  The major mode command could set some variables that are used
> only when tree-sitter is off, and other variables that are used only
> when tree-sitter is on.

In principle, yes.  We just haven't yet found a way of doing this
everywhere in a way that is both convenient and safe enough to release
without a prolonged testing and fixing period.

>   >   I considered that to be "a bridge too far", and
>   > instead decided to go with a safer, simpler alternative that we have
>   > now.
> 
> It sounds like you consider the current design as a _temporary_
> expedient.  If that's what it is, maybe writing this first was a good
> idea.
> 
> I'm talking about how the code should work after there is time to take
> stock and clean it up.

IMO, we currently lack not only time, but also (and more importantly)
the necessary experience and user feedback to decide how to do it
correctly.  We need to collect that experience before we decide on the
best arrangement.  Of course, if the minor-mode idea turns out to be
workable, we will seriously consider it; it's not like we rejected it
for good.



reply via email to

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