From: Stefan Monnier Date: Mon, 30 May 2011 17:14:19 +0000 (-0300) Subject: * bytecomp.el (byte-compile-defvar): Add note about quoted lambda. X-Git-Tag: emacs-pretest-24.0.90~104^2~618^2~88 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6105399dcc36b1b20c95378f895092ab36f7e986;p=emacs.git * bytecomp.el (byte-compile-defvar): Add note about quoted lambda. --- diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index f0f59123aa9..0dae6748c24 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -4155,6 +4155,8 @@ binding slots have been popped." (if (eq fun 'defconst) ;; `defconst' sets `var' unconditionally. (let ((tmp (make-symbol "defconst-tmp-var"))) + ;; Quote with `quote' to prevent byte-compiling the body, + ;; which would lead to an inf-loop. `(funcall '(lambda (,tmp) (defconst ,var ,tmp)) ,value)) ;; `defvar' sets `var' only when unbound.