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: Theodor Thornhill
Subject: Re: master 09b5f00613: ; Fix calls to treesit functions
Date: Mon, 19 Dec 2022 07:26:35 +0100


On 19 December 2022 04:37:03 CET, Stefan Monnier <monnier@iro.umontreal.ca> 
wrote:
>>> How 'bout always defining `treesit-parser-list` (and making it return
>>> `nil` if Emacs was compiled without Tree-sitter support)?
>> Is it indeed guaranteed that the first function to be called by any
>> application that wants to optionally use tree-sitter will be
>> treesit-parser-list? Av
>
>Good question.  Tho I don't think we need a guarantee.
>We just need it to be frequent enough.
>
>> What if they want to start with some other function?
>
>There's always `treesit-available-p`.
>
>
>        Stefan
1>
>

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.

Theo



reply via email to

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