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: Stefan Monnier
Subject: Re: master 09b5f00613: ; Fix calls to treesit functions
Date: Sun, 18 Dec 2022 18:54:01 -0500
User-agent: Gnus/5.13 (Gnus v5.13)

> 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).


        Stefan




reply via email to

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