Mercurial > hg > xemacs-beta
diff lisp/cl-macs.el @ 5475:248176c74e6b
Merge with trunk.
author | Mats Lidell <matsl@xemacs.org> |
---|---|
date | Sat, 23 Apr 2011 23:47:13 +0200 |
parents | 4dee0387b9de f9dc75bdbdc4 |
children | f2881cb841b4 |
line wrap: on
line diff
--- a/lisp/cl-macs.el Tue Mar 29 00:02:47 2011 +0200 +++ b/lisp/cl-macs.el Sat Apr 23 23:47:13 2011 +0200 @@ -619,25 +619,15 @@ (defmacro load-time-value (form &optional read-only) "Like `progn', but evaluates the body at load time. The result of the body appears to the compiler as a quoted constant." - (if (cl-compiling-file) - (let* ((temp (gentemp "--cl-load-time--")) - (set (list 'set (list 'quote temp) form))) - (if (and (fboundp 'byte-compile-file-form-defmumble) - (boundp 'this-kind) (boundp 'that-one)) - (fset 'byte-compile-file-form - (list 'lambda '(form) - (list 'fset '(quote byte-compile-file-form) - (list 'quote - (symbol-function 'byte-compile-file-form))) - (list 'byte-compile-file-form (list 'quote set)) - '(byte-compile-file-form form))) - ;; XEmacs change - (print set (symbol-value ;;'outbuffer - 'byte-compile-output-buffer - ))) - (list 'symbol-value (list 'quote temp))) - (list 'quote (eval form)))) - + (let ((gensym (gensym))) + ;; The body of this macro really should be (cons 'progn form), with the + ;; hairier stuff in a shadowed version in + ;; byte-compile-initial-macro-environment. That doesn't work because + ;; cl-macs.el doesn't respect byte-compile-macro-environment, which is + ;; something we should change. + (put gensym 'cl-load-time-value-form form) + (set gensym (eval form)) + `(symbol-value ',gensym))) ;;; Conditional control structures.