summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2021-12-13 09:31:49 -0500
committerStefan Monnier <monnier@iro.umontreal.ca>2021-12-13 09:32:01 -0500
commit0c24ccc9d8e8f9740040ce433635e8d67e77d7f0 (patch)
tree29a70efc64e9f67dd94f216e1733209a3028493e
parentc952f8b059611739cd8f79151cc7ba7f71d7c95a (diff)
downloademacs-0c24ccc9d8e8f9740040ce433635e8d67e77d7f0.tar.gz
* lisp/emacs-lisp/generator.el (iter-yield): Simplify
-rw-r--r--lisp/emacs-lisp/generator.el6
1 files changed, 2 insertions, 4 deletions
diff --git a/lisp/emacs-lisp/generator.el b/lisp/emacs-lisp/generator.el
index cb0241017a0..ac1412704b0 100644
--- a/lisp/emacs-lisp/generator.el
+++ b/lisp/emacs-lisp/generator.el
@@ -143,8 +143,7 @@ the CPS state machinery."
(setf ,static-var ,dynamic-var)))))
(defmacro cps--with-dynamic-binding (dynamic-var static-var &rest body)
- "Evaluate BODY such that generated atomic evaluations run with
-DYNAMIC-VAR bound to STATIC-VAR."
+ "Run BODY's atomic evaluations run with DYNAMIC-VAR bound to STATIC-VAR."
(declare (indent 2))
`(cps--with-value-wrapper
(cps--make-dynamic-binding-wrapper ,dynamic-var ,static-var)
@@ -645,12 +644,11 @@ modified copy."
(iter-close iterator)))))
iterator))))
-(defun iter-yield (value)
+(defun iter-yield (_value)
"When used inside a generator, yield control to caller.
The caller of `iter-next' receives VALUE, and the next call to
`iter-next' resumes execution with the form immediately following this
`iter-yield' call."
- (identity value)
(error "`iter-yield' used outside a generator"))
(defmacro iter-yield-from (value)