[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
A question about macro bindings in cl-lib
From: |
Xue Fuqiao |
Subject: |
A question about macro bindings in cl-lib |
Date: |
Wed, 24 Apr 2013 16:17:42 +0800 |
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/
- A question about macro bindings in cl-lib,
Xue Fuqiao <=