Subject: bug#21072: Brave new mark-defun (and a testing tool)

From: Michael Heerdegen <[email-masked]>
Date: Wed, 03 May 2017 10:43:01 +0200

Marcin Borkowski <[email-masked]> writes:

> 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        |

I find this table very confusing.  Does the second column really mean
"Is the form evaluated when it is compiled when it is not compiled"?

I suggest to have a look at the definitions.  AFAICT the semantics of
`eval-when-compile' and `eval-and-compile' are defined by (1) their
regular definitions in byte-run.el and (2) the specifications in the
definition of `byte-compile-initial-macro-environment'.  Even if you
don't know much details, it all should be human readable.

Regards,

Michael.