Function: cl-iter-defun
cl-iter-defun is an autoloaded macro defined in cl-macs.el.gz.
Signature
(cl-iter-defun NAME ARGLIST [DOCSTRING] BODY...)
Documentation
Define NAME as a generator function.
Like normal iter-defun, except ARGLIST allows full Common Lisp conventions,
and BODY is implicitly surrounded by (cl-block NAME ...).
Source Code
;; Defined in /usr/src/emacs/lisp/emacs-lisp/cl-macs.el.gz
;;;###autoload
(defmacro cl-iter-defun (name args &rest body)
"Define NAME as a generator function.
Like normal `iter-defun', except ARGLIST allows full Common Lisp conventions,
and BODY is implicitly surrounded by (cl-block NAME ...).
\(fn NAME ARGLIST [DOCSTRING] BODY...)"
(declare (debug
;; Same as iter-defun but use cl-lambda-list.
(&define [&name sexp] ;Allow (setf ...) additionally to symbols.
cl-lambda-list
cl-declarations-or-string
[&optional ("interactive" interactive)]
def-body))
(doc-string 3)
(indent 2)
;; expand (eventually) to function definition on autoload gen
(autoload-macro expand))
(require 'generator)
`(iter-defun ,name ,@(cl--transform-lambda (cons args body) name)))