emacs-devel
[Top][All Lists]
Advanced

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

Re: Would (Eval-when-compile (require 'treesit)) eliminate the need for


From: Philip Kaludercic
Subject: Re: Would (Eval-when-compile (require 'treesit)) eliminate the need for (declare-function)s?
Date: Mon, 17 Apr 2023 13:29:13 +0000

Ruijie Yu via "Emacs development discussions." <emacs-devel@gnu.org>
writes:

> Yuan Fu <casouri@gmail.com> writes:
>
>> I’ve made the mistake of forgetting to add (declare-function treesit-xxx) 
>> when
>> using functions from treesit.c far too many times (sorry!). Since treesit.el
>> contains declare-function’s for every function in treesit.c, if we use
>> (eval-when-compile (require ’treesit)), would it eliminate the need for 
>> adding
>> declare-function’s? Should we do that?
>>
>> Yuan
>
> According to Eli
> (https://lists.gnu.org/archive/html/emacs-devel/2023-03/msg00673.html),
> no, it wouldn't work.

Strictly speaking, he was referring to removing `declare-function',
without replacing it with anything else.  Replacing that with

  (eval-when-compile (require 'treesit))
        ^
        or "eval-and-compile"?

would be a different matter, since that file contains all the treesit
definitions, which I *believe* should be inherited by the requiring
file.

> [ Also, for some reason I cannot find the message using the msgid,
> 83ilezegs1.fsf@gnu.org? ]

[ I could access the message, but I am accessing the list via NNTP ]



reply via email to

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