* semantics of `eval-and-compile'
@ 2008-07-16 15:32 Taylor R Campbell
0 siblings, 0 replies; only message in thread
From: Taylor R Campbell @ 2008-07-16 15:32 UTC (permalink / raw)
To: emacs-devel
The documentation string in Emacs 22.1 reads as follows:
Like `progn', but evaluates the body at compile time and at load time.
The following program, if put into a file and then compiled and
loaded, suggests otherwise, however:
(defun foo ()
(eval-and-compile (message "at compile- or load-time"))
(message "at run-time"))
When compiled, this file reports `at compile- or load-time'. When
loaded, this file reports nothing. When `foo' is called, it reports
`at compile- or load-time' and `at run-time'. Thus the body is *not*
actually evaluated at load-time; rather, it is evaluated at
compile-time and at run-time.
What is the intended semantics? -- what is documented, what is
implemented, or something else altogether?
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-07-16 15:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-16 15:32 semantics of `eval-and-compile' Taylor R Campbell
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).