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: Eli Zaretskii
Subject: Re: Tree-sitter and major mode inheritance
Date: Sun, 20 Nov 2022 16:49:49 +0200

> Date: Sun, 20 Nov 2022 15:22:40 +0200
> Cc: casouri@gmail.com, emacs-devel@gnu.org, monnier@iro.umontreal.ca,
>  theo@thornhill.no
> From: Dmitry Gutov <dgutov@yandex.ru>
> 
> > This is a
> > fragile assumption, so code which is based on it is broken and should be
> > fixed.
> 
> Okay then, but then we'll need to learn another way to ask that 
> question.

I guess.  I admit I didn't know derived-mode-p was being used for such
tests.

Would it make sense to use alternatives, as in

  (or (derived-mode-p 'js-mode)
      (derived-mode-p 'js-ts-mode))

?

Or maybe we should add a new predicate, which will take a LANGUAGE argument,
and use some database of known modes internally to call derived-mode-p as
above?



reply via email to

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