From: Yuan Fu <casouri@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Stefan Monnier <monnier@iro.umontreal.ca>,
emacs-devel@gnu.org, mickey@masteringemacs.org,
theo@thornhill.no, dgutov@yandex.ru
Subject: Re: Extending define-derived-mode
Date: Fri, 2 Jun 2023 00:50:07 -0700 [thread overview]
Message-ID: <FFFCACC6-A80C-4301-813F-F232490A7114@gmail.com> (raw)
In-Reply-To: <835y87elec.fsf@gnu.org>
> On May 31, 2023, at 11:39 PM, Eli Zaretskii <eliz@gnu.org> wrote:
>
>> 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.
I fully agree. Note thought that I wasn’t saying ts and non-ts modes should accept the same set of configs. I know all-too-well that’s impossible (for the majority of modes). I was saying that sometimes there are configs that can be shared (enabling electric-quote-local-mode, for example), and it would be nice to put them in a single hook rather than duplicating the code in two hooks.
Yuan
next prev parent reply other threads:[~2023-06-02 7:50 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-30 5:16 Extending define-derived-mode Yuan Fu
2023-05-30 5:51 ` Theodor Thornhill
2023-05-31 20:35 ` Yuan Fu
2023-06-01 5:43 ` Theodor Thornhill
2023-05-30 10:48 ` Eli Zaretskii
2023-05-30 14:16 ` Stefan Monnier
2023-05-31 21:31 ` Yuan Fu
2023-06-01 4:06 ` Stefan Monnier
2023-06-01 6:39 ` Eli Zaretskii
2023-06-02 7:50 ` Yuan Fu [this message]
2023-06-02 11:54 ` Eli Zaretskii
2023-06-05 7:31 ` Yuan Fu
2023-06-05 11:33 ` Eli Zaretskii
2023-06-08 7:25 ` Yuan Fu
2023-06-02 7:44 ` Yuan Fu
2023-06-02 16:46 ` Stefan Monnier
2023-06-05 7:39 ` Yuan Fu
2023-06-05 15:17 ` Stefan Monnier
2023-05-31 20:48 ` Yuan Fu
2023-06-01 5:47 ` Eli Zaretskii
2023-06-02 7:45 ` Yuan Fu
2023-06-02 11:51 ` Eli Zaretskii
2023-05-30 17:24 ` Juri Linkov
2023-06-05 8:30 ` Philip Kaludercic
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=FFFCACC6-A80C-4301-813F-F232490A7114@gmail.com \
--to=casouri@gmail.com \
--cc=dgutov@yandex.ru \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=mickey@masteringemacs.org \
--cc=monnier@iro.umontreal.ca \
--cc=theo@thornhill.no \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.