APPROVE COMMIT
NOTE: This patch has been committed.
# HG changeset patch
# User Aidan Kehoe <kehoea(a)parhasard.net>
# Date 1318071680 -3600
# Node ID 3e621ba12d367b1e45a44f3bf957d93f3904057f
# Parent 4a6f90020a59a08d19e11df2c3f02bf0647a320b
Don't byte-compile at macroexpansion time, load-time-vale.
lisp/ChangeLog addition:
2011-10-08 Aidan Kehoe <kehoea(a)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.
diff -r 4a6f90020a59 -r 3e621ba12d36 lisp/ChangeLog
--- a/lisp/ChangeLog Tue Oct 04 10:59:17 2011 +0100
+++ b/lisp/ChangeLog Sat Oct 08 12:01:20 2011 +0100
@@ -1,3 +1,11 @@
+2011-10-08 Aidan Kehoe <kehoea(a)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.
+
2011-10-04 Aidan Kehoe <kehoea(a)parhasard.net>
* autoload.el (make-autoload):
diff -r 4a6f90020a59 -r 3e621ba12d36 lisp/bytecomp.el
--- 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))
--
‘Iodine deficiency was endemic in parts of the UK until, through what has been
described as “an unplanned and accidental public health triumph”, iodine was
added to cattle feed to improve milk production in the 1930s.’
(EN Pearce, Lancet, June 2011)
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches