>>>> "KMH" == Karl M Hegbloom
<karlheg(a)bittersweet.inetarena.com> writes:
KMH> Byte compile the following two programs and look at the output.
(setq blah1 (eval-when-compile
(require 'regexp-opt)
(regexp-opt '("blah" "oink" "blah2"
"blah3"))))
(setq blah2 (eval-when (compile eval)
(require 'regexp-opt)
(regexp-opt '("blah" "oink" "blah2"
"blah3"))))
KMH> Why don't they produce the same thing?
Actually, read the Lisp standard. Here is Chapter and Verse:
http://www.xanalys.com/software_tools/reference/HyperSpec/Body/speope_eva...
(eval-when (compile)) is supposed to do NOTHING at compile time,
unless it's a top-level form. This is a Common Lisp thing, not an
XEmacs invention. I didn't try to understand why.
Martin