Function: rst-destructuring-dolist
rst-destructuring-dolist is a macro defined in rst.el.gz.
Signature
(rst-destructuring-dolist (ARGLIST LIST &optional RESULT) &rest BODY)
Documentation
cl-dolist with destructuring of the list elements.
ARGLIST is a Common List argument list which may include
destructuring. LIST, RESULT and BODY are as for cl-dolist.
Note that definitions in ARGLIST are visible only in the BODY and
neither in RESULT nor in LIST.
Source Code
;; Defined in /usr/src/emacs/lisp/textmodes/rst.el.gz
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Helpers.
(cl-defmacro rst-destructuring-dolist
((arglist list &optional result) &rest body)
"`cl-dolist' with destructuring of the list elements.
ARGLIST is a Common List argument list which may include
destructuring. LIST, RESULT and BODY are as for `cl-dolist'.
Note that definitions in ARGLIST are visible only in the BODY and
neither in RESULT nor in LIST."
;; FIXME: It would be very useful if the definitions in ARGLIST would be
;; visible in RESULT. But may be this is rather a
;; `rst-destructuring-do' then.
(declare (debug
(&define ([&or symbolp cl-macro-list] def-form &optional def-form)
cl-declarations def-body))
(indent 1))
(let ((var (make-symbol "--rst-destructuring-dolist-var--")))
`(cl-dolist (,var ,list ,result)
(cl-destructuring-bind ,arglist ,var
,@body))))