Mercurial > hg > xemacs-beta
diff lisp/bytecomp.el @ 5579:3e621ba12d36
Don't byte-compile at macroexpansion time, load-time-vale.
lisp/ChangeLog addition:
2011-10-08 Aidan Kehoe <kehoea@parhasard.net>
* bytecomp.el (byte-compile-initial-macro-environment):
In the compiler implementation of load-time-value, don't
byte-compile at macroexpansion time, delay that until
byte-compilation time, giving, e.g. labels a chance to do its
thing.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Sat, 08 Oct 2011 12:01:20 +0100 |
parents | 0b6e7ae1e78f |
children | 4218b56833b3 |
line wrap: on
line diff
--- a/lisp/bytecomp.el Tue Oct 04 10:59:17 2011 +0100 +++ b/lisp/bytecomp.el Sat Oct 08 12:01:20 2011 +0100 @@ -500,16 +500,22 @@ (if (listp cl-declare-stack) (push (car specs) cl-declare-stack)) (cl-do-proclaim (pop specs) nil)))) (load-time-value - . ,#'(lambda (form &optional read-only) - (let* ((gensym (gensym)) - (byte-compile-bound-variables - (acons gensym byte-compile-global-bit - byte-compile-bound-variables))) - (setq byte-compile-output-preface - (byte-compile-top-level - `(progn (setq ,gensym ,form) ,byte-compile-output-preface) - t 'file)) - `(symbol-value ',gensym)))) + . ,(symbol-macrolet ((wrapper '#:load-time-value)) + (put wrapper 'byte-compile + #'(lambda (form) + (let* ((gensym (gensym)) + (byte-compile-bound-variables + (acons gensym byte-compile-global-bit + byte-compile-bound-variables))) + (setq byte-compile-output-preface + (byte-compile-top-level + `(progn + (setq ,gensym (progn ,(second form))) + ,byte-compile-output-preface) + t 'file)) + (byte-compile-form `(symbol-value ',gensym) nil)))) + #'(lambda (form &optional read-only) + (list wrapper form)))) (labels . ,#'(lambda (bindings &rest body) (let* ((names (mapcar 'car bindings))