]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/emacs-lisp/generator.el (iter-yield): Simplify
authorStefan Monnier <monnier@iro.umontreal.ca>
Mon, 13 Dec 2021 14:31:49 +0000 (09:31 -0500)
committerStefan Monnier <monnier@iro.umontreal.ca>
Mon, 13 Dec 2021 14:32:01 +0000 (09:32 -0500)
lisp/emacs-lisp/generator.el

index cb0241017a023569163d5dbb1225c0198b9f7a05..ac1412704b0630e88f7ecbd0ace4dfcf28f39775 100644 (file)
@@ -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)