summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2011-05-30 14:14:19 -0300
committerStefan Monnier <monnier@iro.umontreal.ca>2011-05-30 14:14:19 -0300
commit6105399dcc36b1b20c95378f895092ab36f7e986 (patch)
treeca40d8a77b9f98ef55e4306f120db11bd5c3dfe3 /lisp/emacs-lisp
parent9fbfd2752088af2bfbbfbf488d4be9477a875e2f (diff)
downloademacs-6105399dcc36b1b20c95378f895092ab36f7e986.tar.gz
emacs-6105399dcc36b1b20c95378f895092ab36f7e986.tar.bz2
emacs-6105399dcc36b1b20c95378f895092ab36f7e986.zip
* bytecomp.el (byte-compile-defvar): Add note about quoted lambda.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/bytecomp.el2
1 files changed, 2 insertions, 0 deletions
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.