emacs-devel
[Top][All Lists]
Advanced

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

Re: master 09b5f00613: ; Fix calls to treesit functions


From: Eli Zaretskii
Subject: Re: master 09b5f00613: ; Fix calls to treesit functions
Date: Tue, 20 Dec 2022 15:59:08 +0200

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: Yuan Fu <casouri@gmail.com>,  theo@thornhill.no,  emacs-devel@gnu.org
> Date: Mon, 19 Dec 2022 23:37:28 -0500
> 
> > SGTM, but I think we should document somewhere how does one write a
> > Lisp program that could optionally use tree-sitter, i.e. which APIs
> > text for the availability of tree-sitter support internally, and thus
> > could serve as a gate-keepers.
> 
> I think this can be done simply by listing which functions are always
> defined.

No, this is not enough, IMO.  What is needed in addition is to
document how to know, with each of these always-defined functions,
whether tree-sitter can be used (most probably, by examining the
returned value).

> Then we just have to make sure that those functions can be
> implemented correctly even without Tree-sitter.

The implementation without tree-sitter will probably be trivial, like
return nil or something like that.



reply via email to

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