|
From: | Dmitry Gutov |
Subject: | Re: Tree-sitter and major mode inheritance |
Date: | Sun, 20 Nov 2022 17:24:59 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 |
On 20.11.2022 16:49, Eli Zaretskii wrote:
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)) ?
Those kind of lists are going to be inherently non-exhaustive.
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?
Some kind of new registry could be the answer, but it would be nice to manage using the existing tools/variables somehow.
Stefan has touched on this issue in https://debbugs.gnu.org/58075
[Prev in Thread] | Current Thread | [Next in Thread] |