diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2021-08-11 18:20:35 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2021-08-11 18:20:35 -0400 |
commit | bd6c3a014a55176c56ca38c89c6ecab69a384ab7 (patch) | |
tree | e506b92f597ec54b370f81164abacc8156e8a6b9 /lisp | |
parent | 2f90fa19b8fdc70303232d389553afa524c72509 (diff) | |
download | emacs-bd6c3a014a55176c56ca38c89c6ecab69a384ab7.tar.gz |
* lisp/obsolete/cl.el (labels): Don't quote lambda
(flet): Don't need `fboundp` any more before calling `symbol-function`.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/obsolete/cl.el | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lisp/obsolete/cl.el b/lisp/obsolete/cl.el index 09f9ab7b7f2..9df62318572 100644 --- a/lisp/obsolete/cl.el +++ b/lisp/obsolete/cl.el @@ -431,8 +431,7 @@ definitions, or lack thereof). (obsolete "use either `cl-flet' or `cl-letf'." "24.3")) `(letf ,(mapcar (lambda (x) - (if (or (and (fboundp (car x)) - (eq (car-safe (symbol-function (car x))) 'macro)) + (if (or (eq (car-safe (symbol-function (car x))) 'macro) (cdr (assq (car x) macroexpand-all-environment))) (error "Use `labels', not `flet', to rebind macro names")) (let ((func `(cl-function @@ -466,10 +465,10 @@ rather than relying on `lexical-binding'." (push `(cl-function (lambda . ,(cdr binding))) sets) (push var sets) (push (cons (car binding) - `(lambda (&rest cl-labels-args) - (if (eq (car cl-labels-args) cl--labels-magic) - (list cl--labels-magic ',var) - (cl-list* 'funcall ',var cl-labels-args)))) + (lambda (&rest 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'. |