mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
lisp/emacs-lisp/cl.el (cl--function-convert): Work for cl-flet and cl-labels
This commit is contained in:
parent
2639c2ed08
commit
1fe087a1ab
2 changed files with 9 additions and 8 deletions
|
|
@ -1,5 +1,9 @@
|
|||
2015-01-26 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
2015-01-27 Katsumi Yamaoka <yamaoka@jpl.org>
|
||||
|
||||
* emacs-lisp/cl.el (cl--function-convert): Run cl--labels-convert
|
||||
for the case cl-flet or cl-labels form is wrapped with lexical-let.
|
||||
|
||||
2015-01-26 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* emacs-lisp/cl-generic.el (cl--generic-method): New struct.
|
||||
(cl--generic): The method-table is now a (list-of cl--generic-method).
|
||||
|
|
|
|||
|
|
@ -342,6 +342,8 @@ The two cases that are handled are:
|
|||
- renaming of F when it's a function defined via `cl-labels' or `labels'."
|
||||
(require 'cl-macs)
|
||||
(declare-function cl--expr-contains-any "cl-macs" (x y))
|
||||
(declare-function cl--labels-convert "cl-macs" (f))
|
||||
(defvar cl--labels-convert-cache)
|
||||
(cond
|
||||
;; ¡¡Big Ugly Hack!! We can't use a compiler-macro because those are checked
|
||||
;; *after* handling `function', but we want to stop macroexpansion from
|
||||
|
|
@ -374,13 +376,8 @@ The two cases that are handled are:
|
|||
(setq cl--function-convert-cache (cons newf res))
|
||||
res))))
|
||||
(t
|
||||
(let ((found (assq f macroexpand-all-environment)))
|
||||
(if (and found (ignore-errors
|
||||
(eq (cadr (cl-caddr found)) 'cl-labels-args)))
|
||||
(cadr (cl-caddr (cl-cadddr found)))
|
||||
(let ((res `(function ,f)))
|
||||
(setq cl--function-convert-cache (cons f res))
|
||||
res))))))
|
||||
(setq cl--labels-convert-cache cl--function-convert-cache)
|
||||
(cl--labels-convert f))))
|
||||
|
||||
(defmacro lexical-let (bindings &rest body)
|
||||
"Like `let', but lexically scoped.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue