emacs-devel
[Top][All Lists]
Advanced

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

Re: Tree-sitter and major mode inheritance


From: Yuan Fu
Subject: Re: Tree-sitter and major mode inheritance
Date: Sat, 19 Nov 2022 13:45:41 -0800


> On Nov 19, 2022, at 9:52 AM, Eli Zaretskii <eliz@gnu.org> wrote:
> 
>> From: Yuan Fu <casouri@gmail.com>
>> Date: Sat, 19 Nov 2022 09:17:11 -0800
>> Cc: Eli Zaretskii <eliz@gnu.org>,
>> emacs-devel@gnu.org,
>> theo@thornhill.no
>> 
>> If we are already renaming existing modes (cc-<foo>-mode), why don’t we use 
>> the generic name <foo>-mode for the virtual parent mode? It would be nicer 
>> if the generic mode (<foo>-mode) is an actual mode, with mode hooks, 
>> keycaps, etc, rather than simply a dispatch function.
> 
> I already said that I prefer not to rename existing modes.  Such
> renaming will break too many init files and other Lisp programs.

I guess we can at least try it for a bit? Because hook, keymaps, etc, should 
just work, that’s the point of major mode inheritance, after all. C-native-mode 
will run all the setup for c-mode, plus setup for c-native-mode.

Yuan


reply via email to

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