emacs-devel
[Top][All Lists]
Advanced

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

Re: Tree sitter support for C-like languages


From: Stefan Monnier
Subject: Re: Tree sitter support for C-like languages
Date: Fri, 11 Nov 2022 08:37:02 -0500
User-agent: Gnus/5.13 (Gnus v5.13)

> Yeah, I'm interested in reducing duplication, but not for that reason
> only.  But I'm thinking of ways to make one inherit the other.

I like inheritance between modes, but I recommend that you never inherit
from a "normal mode": modes should be either designed for inheritance
(`prog-mode`, `text-mode`, `special-mode`, `tex-mode`, ...) or be
actually used in buffers, but preferably not both.

So better create a "c-like" parent mode from which both `c-ts-mode` and
`c++-ts-mode` inherit than have one inherit from the other.


        Stefan




reply via email to

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