unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* A question about macro bindings in cl-lib
@ 2013-04-24  8:17 Xue Fuqiao
  2013-04-24  8:56 ` Stephen Berman
  2013-04-24 13:33 ` Stefan Monnier
  0 siblings, 2 replies; 4+ messages in thread
From: Xue Fuqiao @ 2013-04-24  8:17 UTC (permalink / raw)
  To: help-gnu-emacs

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/



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-04-24 22:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-24  8:17 A question about macro bindings in cl-lib Xue Fuqiao
2013-04-24  8:56 ` Stephen Berman
2013-04-24 13:33 ` Stefan Monnier
2013-04-24 22:23   ` Xue Fuqiao

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).