GNU bug report logs -
#14551
compiler fails to track eval-when-compile in required files
Previous Next
Full log
View this message in rfc822 format
Package: emacs
Severity: minor
Version: 24.3
(I guess this issue has always been present.)
Suppose we have three files:
foo.el:
(require 'lib)
(defun foo ()
(lib2-func))
lib.el:
(eval-when-compile
(require 'lib2))
(provide 'lib)
lib2.el:
(defun lib2-func ()
t)
(provide 'lib2)
rm lib*.elc
emacs -Q -L . -batch -f batch-byte-compile foo.el
produces no warnings.
If lib.el is compiled first though:
emacs -Q -L . -batch -f batch-byte-compile lib.el
emacs -Q -L . -batch -f batch-byte-compile foo.el
In end of data:
foo.el:6:1:Warning: the function `lib2-func' is not known to be defined.
eval-when-compile is equivalent to progn in uncompiled code, and the
compiler doesn't compile things brought in by require.
This bug report was last modified 1 year and 152 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.