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: Yuan Fu
Subject: Re: master 09b5f00613: ; Fix calls to treesit functions
Date: Mon, 19 Dec 2022 00:26:27 -0800


> On Dec 18, 2022, at 3:54 PM, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
> 
>> That makes sense.  Also, anyone using tree-sitter functions needs to
>> declare functions in treesit.c in case Emacs didn’t build with
>> tree-sitter.  Should we streamline it with a macro like this?
> 
> I wouldn't bother.
> 
>> (eval-when-compile
>>  (require 'treesit)
>>  (treesit-declare-c-functions))
> 
> `declare-function` within a `eval-when-compile` (just like (defvar
> <foo>)) is a bad idea.  If it works, it's only by accident and can be
> considered a bug (which could get fixed).
> 

Cool, glad I asked ;-)

Yuan


reply via email to

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