GNU bug report logs -
#19613
25.0.50; cl-labels bug
Previous Next
Reported by: Katsumi Yamaoka <yamaoka <at> jpl.org>
Date: Fri, 16 Jan 2015 05:20:02 UTC
Severity: normal
Found in version 25.0.50
Done: Stefan Monnier <monnier <at> iro.umontreal.ca>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
On Mon, 26 Jan 2015 10:14:56 -0500, Stefan Monnier wrote:
[...]
> This looks correct. Ideally this part of cl--function-convert should
> delegate to cl--labels-convert to avoid the code duplication, tho.
That's much better. Here it is:
[Message part 2 (text/x-patch, inline)]
--- cl.el~ 2015-01-26 04:16:45.291325300 +0000
+++ cl.el 2015-01-26 22:57:02.040588600 +0000
@@ -342,6 +342,7 @@
- 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))
(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 +375,8 @@
(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.
This bug report was last modified 10 years and 115 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.