> There's almost zero semantics in `(eval-when-compile (defvar xxx))'.

There is: it says someting along the lines of "evaluate (defvar foo) during
byte-compilation".  Now evaluating (defvar foo) has *zero* effect, so the
above code is equivalent to not writing anything.

It's only by chance that the byte-compiler actually looks at the contents of
`eval-when-compile' (rather than just passing it to `eval') and finds the
`defvar' which it interprets then as a kind of "extern" declaration.

So when writing the above code, you're relying on undocumented
implementation details of the byte-compiler.

Also it takes more visual space, and more byte-compile time.

The form (defvar foo) was specifically designed as a byte-compiler
directive, so please make use of it.


        Stefan


_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

Reply via email to