diff options
author | Noam Postavsky <npostavs@gmail.com> | 2018-06-12 18:41:46 -0400 |
---|---|---|
committer | Noam Postavsky <npostavs@gmail.com> | 2018-06-19 20:02:16 -0400 |
commit | e292c0973cf7a92819d312ea8a828b67e6adf1ab (patch) | |
tree | 5ae59aef028cd644b87d6d4d8909972515a2a3b4 /lisp/emacs-lisp/cl.el | |
parent | 36737705b451ad4c765baa5789e3ceb752ee07a3 (diff) | |
download | emacs-e292c0973cf7a92819d312ea8a828b67e6adf1ab.tar.gz emacs-e292c0973cf7a92819d312ea8a828b67e6adf1ab.tar.bz2 emacs-e292c0973cf7a92819d312ea8a828b67e6adf1ab.zip |
Fix #'fun handling inside `labels' (Bug#31792)
* lisp/emacs-lisp/cl.el (labels): Apply the equivalent of the
cl-labels change from 2015-01-16 "* lisp/emacs-lisp/cl-macs.el: Fix
last change".
* test/lisp/emacs-lisp/cl-tests.el (labels-function-quoting): New
test.
* lisp/emacs-lisp/cl-macs.el (cl-flet, cl-labels): Improve docstring,
link to relevant manual page.
* doc/misc/cl.texi (Function Bindings): Don't imply that function
cells of symbols are modified by cl-flet. Don't claim that cl-flet or
cl-labels affect references of the form (quote FUNC).
Diffstat (limited to 'lisp/emacs-lisp/cl.el')
-rw-r--r-- | lisp/emacs-lisp/cl.el | 7 |
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 |