From: Katsumi Yamaoka <yamaoka@jpl.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 19613@debbugs.gnu.org
Subject: bug#19613: 25.0.50; cl-labels bug
Date: Tue, 27 Jan 2015 08:00:57 +0900 [thread overview]
Message-ID: <b4m61btp2om.fsf@jpl.org> (raw)
In-Reply-To: <b4m1tmv9ub4.fsf@jpl.org>
[-- Attachment #1: Type: text/plain, Size: 239 bytes --]
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:
[-- Attachment #2: Type: text/x-patch, Size: 1136 bytes --]
--- 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.
next prev parent reply other threads:[~2015-01-26 23:00 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-16 5:19 bug#19613: 25.0.50; cl-labels bug Katsumi Yamaoka
2015-01-16 14:50 ` Stefan Monnier
2015-01-16 20:09 ` Glenn Morris
2015-01-17 3:57 ` Stefan Monnier
2015-01-22 7:07 ` Katsumi Yamaoka
2015-01-26 5:57 ` Katsumi Yamaoka
2015-01-26 15:14 ` Stefan Monnier
2015-01-26 23:00 ` Katsumi Yamaoka [this message]
2015-01-26 23:25 ` Katsumi Yamaoka
2015-01-27 2:06 ` Stefan Monnier
2015-01-27 3:16 ` Katsumi Yamaoka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b4m61btp2om.fsf@jpl.org \
--to=yamaoka@jpl.org \
--cc=19613@debbugs.gnu.org \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).