diff options
author | Katsumi Yamaoka <yamaoka@jpl.org> | 2015-01-27 03:15:49 +0000 |
---|---|---|
committer | Katsumi Yamaoka <yamaoka@jpl.org> | 2015-01-27 03:15:49 +0000 |
commit | 1fe087a1ab4182b2e6c1d05444461acc4e78e2d8 (patch) | |
tree | d64e62b7e642fafd824b004de6a85ae5188c20e7 /lisp/emacs-lisp | |
parent | 2639c2ed08e5b9a55939bab0c575537e50f61141 (diff) | |
download | emacs-1fe087a1ab4182b2e6c1d05444461acc4e78e2d8.tar.gz emacs-1fe087a1ab4182b2e6c1d05444461acc4e78e2d8.tar.bz2 emacs-1fe087a1ab4182b2e6c1d05444461acc4e78e2d8.zip |
lisp/emacs-lisp/cl.el (cl--function-convert): Work for cl-flet and cl-labels
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/cl.el | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/lisp/emacs-lisp/cl.el b/lisp/emacs-lisp/cl.el index da3eab73fc4..1cd7bd76b0e 100644 --- a/lisp/emacs-lisp/cl.el +++ b/lisp/emacs-lisp/cl.el @@ -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. |