Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

eval-when-compile and declare-function

14 views
Skip to first unread message

Joe Riel

unread,
Dec 31, 2009, 6:39:17 PM12/31/09
to help-gn...@gnu.org
Why does declare-function not work when used inside eval-when-compile?
It does work inside eval-and-compile. For example, byte-compile the
following:

(eval-and-compile
(declare-function hello "hello"))
(eval-when-compile
(declare-function goodbye "goodbye"))
(declare-function whatever "whatever")
(defun junk ()
(hello)
(goodbye)
(whatever))

Compiling file /home/joe/emacs/mdb/lisp/test.el at Thu Dec 31 15:34:09 2009

In end of data:
test.el:13:1:Warning: the function `goodbye' is not known to be defined.


I'm guessing the expected usage is the declaration for "whatever", that is,
outside either eval-and-compile or eval-when-compile.


0 new messages