summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/cl.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/emacs-lisp/cl.el')
-rw-r--r--lisp/emacs-lisp/cl.el7
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/cl.el b/lisp/emacs-lisp/cl.el
index d53c8e0bbcf..f6643158d2d 100644
--- a/lisp/emacs-lisp/cl.el
+++ b/lisp/emacs-lisp/cl.el
@@ -466,9 +466,12 @@ rather than relying on `lexical-binding'."
(push var sets)
(push (cons (car binding)
`(lambda (&rest cl-labels-args)
- (cl-list* 'funcall ',var
- cl-labels-args)))
+ (if (eq (car cl-labels-args) cl--labels-magic)
+ (list cl--labels-magic ',var)
+ (cl-list* 'funcall ',var cl-labels-args))))
newenv)))
+ ;; `lexical-let' adds `cl--function-convert' (which calls
+ ;; `cl--labels-convert') as a macroexpander for `function'.
(macroexpand-all `(lexical-let ,vars (setq ,@sets) ,@body) newenv)))
;; Generalized variables are provided by gv.el, but some details are