GNU bug report logs -
#69521
29.1; Adding a DECLARE spec equivalent to DECLARE-FUNCTION
Previous Next
Full log
View this message in rfc822 format
Adam Porter <adam <at> alphapapa.net> writes:
> On 3/3/24 05:18, Eli Zaretskii wrote:
>
>> Thanks, but I think this should be discussed on emacs-devel first.
>> The bug tracker is not a good vessel of discussing ideas; in
>> particular. quite a few of people who should be part of such a
>> discussion don't read bug-gnu-emacs regularly, and must be explicitly
>> CC'ed to take notice.
>> So I suggest to start the discussion on emacs-devel, and only switch
>> here if/when the idea and its implementation aspects are clear enough
>> to post a patch.
>
> Ok, I filed the bug report because I had mentioned it in that thread and it
> seemed to get overlooked. Now I've posted a new thread. Please see:
>
> https://lists.gnu.org/archive/html/emacs-devel/2024-03/msg00118.html
In that thread, Basil wrote:
My vote is for instead teaching the compiler to treat
declare-function more like it treats defvar, in that the effect of
declare-function should be made local to the current lexical scope.
[It is already possible to write this way, and I've been known to,
but sadly the effect is global.] This wish has been raised and
agreed on here (at least in passing) before.
This would reap all the benefits of points 1-4, as well as an
additional one: that declare-function is lexically closer to the
implementation through which the need for the declaration arises. I
think a declaration at the top of a function is more likely to be
forgotten and become stale as the implementation changes.
FWIW, I'd very much welcome such a change.
Adam, are you interested in working on that?
This bug report was last modified 106 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.