emacs-devel
[Top][All Lists]
Advanced

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

Re: Extending define-derived-mode


From: Eli Zaretskii
Subject: Re: Extending define-derived-mode
Date: Thu, 01 Jun 2023 09:39:39 +0300

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: Eli Zaretskii <eliz@gnu.org>,  emacs-devel@gnu.org,
>   mickey@masteringemacs.org,  theo@thornhill.no,  dgutov@yandex.ru
> Date: Thu, 01 Jun 2023 00:06:54 -0400
> 
> > Keep in mind that when people try out tree-sitter modes, they are unlikely
> > to just throw away their config for the old mode; also since tree-sitter and
> > grammars aren’t the easiest to install, people working on multiple machines
> > probably want both tree-sitter and no-tree-sitter modes configured and ready
> > to go. So I think we’ll see a lot of people having config for both modes (me
> > included).
> 
> Good point.

It's a good point, indeed, but with some mode pairs is very hard
(read: impossible) to achieve.  A notable example is c-mode and
c-ts-mode: the former has a lot of mode-specific commands and features
that cannot be used with the latter, because there's no equivalent
infrastructure that supports the same interfaces, and sometimes
because the feature makes no sense in a TS-based mode.  We try very
hard to use the same key bindings and variable names where it does
make sense, but the group of features where that is possible is very
small.  For example, all the enormous set of features we have in CC
mode around indentation and its customization cannot be "ported" to
c-ts-mode and c++-ts-mode, because the latter is built on completely
different analysis of the text.  Another example is the ad-hoc support
for some frequently-use macro names that CC mode has.



reply via email to

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