[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#21072: Brave new mark-defun (and a testing tool)
From: |
Marcin Borkowski |
Subject: |
bug#21072: Brave new mark-defun (and a testing tool) |
Date: |
Wed, 03 May 2017 07:27:20 +0200 |
User-agent: |
mu4e 0.9.19; emacs 26.0.50 |
On 2017-04-30, at 18:10, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>> 2. I still don't fully get the `eval-and-compile' stuff. What exactly
>> happens when the file is compiled?
>
> During compilation, (eval-and-compile E) will be treated (i.e. compiled)
> just like E, except that E is evaluated along the way (so the
> definitions present in E are available during compilation).
>
>> I understand that its forms are not evaluated.
>
> They are. It's for `eval-when-compile` that they aren't.
Thanks for your answer, but I'm still not sure. Are the tables below
right?
Running:
| form | evaled? | compiled? |
|---------------------------------+---------+-----------|
| (defun ...) | yes | no |
| (eval-when-compile (defun ...)) | no | no |
| (eval-and-compile (defun ...)) | yes | no |
| (defmacro ...) | yes | no |
Compilation:
| form | evaled? | compiled? |
|---------------------------------+---------+-----------|
| (defun ...) | no | yes |
| (eval-when-compile (defun ...)) | yes | yes |
| (eval-and-compile (defun ...)) | yes | yes |
| (defmacro ...) | yes | yes |
TIA,
--
Marcin Borkowski
- bug#21072: Brave new mark-defun (and a testing tool),
Marcin Borkowski <=