>>>> "Karl" == Karl M Hegbloom
<karlheg(a)bittersweet.inetarena.com> writes:
Karl> 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"))))
Karl> Why don't they produce the same thing?
Because I haven't committed the following patch, which fixes it.
Unfortunately, I can generate such patches faster than I can test
them. My apologies to Martin Stjernholm as well as to Karl.
Note that someone may be relying on this XEmacs bug, and it's also an
FSF Emacs bug, so a proper bug fix involves getting Gerd to agree it's
a bug, bytecompile all .el files in the universe pre- and post-patch,
compare the generated .elc files, and audit any that show differences.
Would anyone like to volunteer to do the testing job?
Index: lisp/bytecomp.el
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs/lisp/bytecomp.el,v
retrieving revision 1.8.2.16
diff -u -w -r1.8.2.16 bytecomp.el
--- lisp/bytecomp.el 2000/10/12 07:22:37 1.8.2.16
+++ lisp/bytecomp.el 2000/11/01 04:47:20
@@ -447,8 +447,7 @@
'((byte-compiler-options . (lambda (&rest forms)
(apply 'byte-compiler-options-handler forms)))
(eval-when-compile . (lambda (&rest body)
- (list 'quote (eval (byte-compile-top-level
- (cons 'progn body))))))
+ (list 'quote (eval (cons 'progn body)))))
(eval-and-compile . (lambda (&rest body)
(eval (cons 'progn body))
(cons 'progn body))))