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: Mon, 19 Dec 2022 16:40:16 +0200

> From: Theodor Thornhill <theo@thornhill.no>
> Cc: emacs-devel@gnu.org, monnier@iro.umontreal.ca
> Date: Mon, 19 Dec 2022 14:47:24 +0100
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> >> Date: Mon, 19 Dec 2022 07:26:35 +0100
> >> From: Theodor Thornhill <theo@thornhill.no>
> >> 
> >> How about treesit-ensure, that checks treesit-available-p and whether it's 
> >> enabled for the current mode? The treesit-parser-list is also kind of 
> >> working just by accident, as it isn't its job to ensure availability.
> >
> > Isn't that what treesit-language-available-p already does?
> 
> Yeah, but I don't want to check for a particular language, only that
> subsequent calls to treesit-functions will be available.

You said:

  How about treesit-ensure, that checks treesit-available-p and
  whether it's enabled for the current mode?

If this check is for the current mode, then you already have the
"particular language", don't you?

And that is eventually the right test, because even if the tree-sitter
library is compiled in and available, the grammar library might not
be, which means the code cannot use tree-sitter in such a situation.



reply via email to

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