emacs-devel
[Top][All Lists]
Advanced

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

Re: byte-compiler warnings about undefined functions can now be silenced


From: Jay Belanger
Subject: Re: byte-compiler warnings about undefined functions can now be silenced
Date: Mon, 19 Nov 2007 13:33:33 -0600

> Dan Nicolaescu wrote:
...
> When bootstrapping, there are lots of messages about functions that
> are "not known to be defined". The compiler is technically correct, but
> the code is usually such that when it actually runs, the function will
> be defined.
...
> All you need to do is add a `declare-function' statement before the
> first use of the function in question:
>
>   (declare-function gud-find-c-expr "gud.el" nil)
>
> This says that gud-find-c-expr is defined in "gud.el" (the `.el' can
> be omitted). The file path is either absolute, or relative to the one
> with the declare-function statement (e.g. "../files.el").
...
> You don't have to specify the argument list, but if you do the
> byte-compiler will check that the calls match the declaration.

Is there any reason the filename isn't optional, too?  `check-declare-file'
wouldn't be able to check anything in that case, of course, but it could
still keep the byte-compiler quiet.

Jay




reply via email to

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