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: Eli Zaretskii
Subject: Re: Would (Eval-when-compile (require 'treesit)) eliminate the need for (declare-function)s?
Date: Mon, 17 Apr 2023 20:05:37 +0300

> From: Yuan Fu <casouri@gmail.com>
> Date: Sun, 16 Apr 2023 20:12:22 -0700
> 
> 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?

Even if it does work reliably, I'm not sure we want that.  It is
better to have declare-function where the function is used, as that
makes maintenance easier and less error-prone.

Lars, Stefan: WDYT?



reply via email to

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