emacs-devel
[Top][All Lists]
Advanced

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

Re: Do we need C's extern in Emacs Lisp?


From: Stefan Monnier
Subject: Re: Do we need C's extern in Emacs Lisp?
Date: Tue, 29 Mar 2022 17:09:10 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

> For example, if
>
>     (defvar foo)
>
> is in a Lisp file, then subsequent use of foo will generate an unknown
> variable warning.

That's not my experience.  Do you have a recipe?

> For example(2), if in the Lisp file there is
>
>     (declare-function foo nil)
>
> , this generates a warning when the function foo is later defined.

I haven't verified that it's indeed the case, but it sounds likely,
indeed.  We could consider silencing this warning, but I wonder why
you'd put such a `declare-function` in the same file where you define
`foo`, since it's redundant anyway.

Do you have a good use-case for it?


        Stefan




reply via email to

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