# HG changeset patch # User Aidan Kehoe # Date 1323808950 0 # Node ID a944c124b2d39f393676c0168ae690e7141d5576 # Parent 2c20bc575989a4cbda81d72a048d74f2665327ef Be more careful about what we shadow, #'byte-compile-eval. 2011-12-13 Aidan Kehoe * bytecomp.el (byte-compile-eval): When evaluating code at compile time, don't put those macros in the macro environment that only make sense when creating byte-compiled output. diff -r 2c20bc575989 -r a944c124b2d3 lisp/ChangeLog --- a/lisp/ChangeLog Tue Dec 13 20:28:32 2011 +0000 +++ b/lisp/ChangeLog Tue Dec 13 20:42:30 2011 +0000 @@ -5,6 +5,13 @@ 2011-12-13 Aidan Kehoe + * bytecomp.el (byte-compile-eval): + When evaluating code at compile time, don't put those macros in + the macro environment that only make sense when creating + byte-compiled output. + +2011-12-13 Aidan Kehoe + * bytecomp.el (byte-compile-initial-macro-environment): If lexical let has played with our lambas, give up on constructing the compiled functions at compiled time, that strategy doesn't diff -r 2c20bc575989 -r a944c124b2d3 lisp/bytecomp.el --- a/lisp/bytecomp.el Tue Dec 13 20:28:32 2011 +0000 +++ b/lisp/bytecomp.el Tue Dec 13 20:42:30 2011 +0000 @@ -455,11 +455,16 @@ ;;; "If a file being compiled contains a `defmacro' form, the macro is ;;; defined temporarily for the rest of the compilation of that file." (defun byte-compile-eval (form) - (let ((save-macro-environment nil)) + (let ((save-macro-environment nil) + ;; These are macros in byte-compile-initial-macro-environment that + ;; shouldn't be shadowed when calling #'byte-compile-eval, since + ;; such code is interpreted, not compiled. + ;; #### Consider giving this a docstring and a top-level value. + (byte-compile-no-shadow '(load-time-value labels flet))) (unwind-protect (loop for (sym . def) in byte-compile-macro-environment - do (when (symbolp sym) + do (when (and (symbolp sym) (not (memq sym byte-compile-no-shadow))) (push (if (fboundp sym) (cons sym (symbol-function sym))