[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
semantics of `eval-and-compile'
From: |
Taylor R Campbell |
Subject: |
semantics of `eval-and-compile' |
Date: |
Wed, 16 Jul 2008 11:32:07 -0400 |
User-agent: |
IMAIL/1.21; Edwin/3.116; MIT-Scheme/7.7.90.+ |
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?
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- semantics of `eval-and-compile',
Taylor R Campbell <=