unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#14551: compiler fails to track eval-when-compile in required files
@ 2013-06-03 20:30 Glenn Morris
  2013-06-03 20:59 ` Stefan Monnier
  0 siblings, 1 reply; 4+ messages in thread
From: Glenn Morris @ 2013-06-03 20:30 UTC (permalink / raw)
  To: 14551

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.





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-01-12 15:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-03 20:30 bug#14551: compiler fails to track eval-when-compile in required files Glenn Morris
2013-06-03 20:59 ` Stefan Monnier
2024-01-10 11:17   ` Stefan Kangas
2024-01-12 15:57     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).