From: Xue Fuqiao <xfq.free@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: A question about macro bindings in cl-lib
Date: Wed, 24 Apr 2013 16:17:42 +0800 [thread overview]
Message-ID: <CAAF+z6GqtdJhpgXrHT4rTRtUo+wmscufzbA6UyV37RQCDKTY4Q@mail.gmail.com> (raw)
In (info "(cl) Macro Bindings"):
(cl-defmacro my-dolist ((x list) &rest body)
(let ((var (cl-gensym)))
(list 'cl-loop 'for var 'on list 'do
(cl-list* 'cl-symbol-macrolet
(list (list x (list 'car var)))
body))))
(setq mylist '(1 2 3 4))
(my-dolist (x mylist) (cl-incf x))
mylist
=> (2 3 4 5)
The `my-dolist' call shown here expands to
(cl-loop for G1234 on mylist do
(cl-symbol-macrolet ((x (car G1234)))
(cl-incf x)))
I understand what this macro does, but what does "G1234" mean here? (I
have searched the archives, but "No document matching your query".)
--
Best regards, Xue Fuqiao.
http://www.gnu.org/software/emacs/
next reply other threads:[~2013-04-24 8:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-24 8:17 Xue Fuqiao [this message]
2013-04-24 8:56 ` A question about macro bindings in cl-lib Stephen Berman
2013-04-24 13:33 ` Stefan Monnier
2013-04-24 22:23 ` Xue Fuqiao
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=CAAF+z6GqtdJhpgXrHT4rTRtUo+wmscufzbA6UyV37RQCDKTY4Q@mail.gmail.com \
--to=xfq.free@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/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.
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).