summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorGemini Lasswell <gazally@runbox.com>2017-10-05 12:41:35 -0700
committerGemini Lasswell <gazally@runbox.com>2017-10-05 12:43:15 -0700
commit9a10c8713b8dd46738365d35263ae0687e2063cc (patch)
treef32070e3443094961bdea1486a12645523ac8523 /lisp/emacs-lisp
parent2a32ee1fbc148d440fc12aa390ed3d2cc7d6fe3b (diff)
downloademacs-9a10c8713b8dd46738365d35263ae0687e2063cc.tar.gz
emacs-9a10c8713b8dd46738365d35263ae0687e2063cc.tar.bz2
emacs-9a10c8713b8dd46738365d35263ae0687e2063cc.zip
Fix dynamic binding wrapper in iter-lambda (bug#25965)
* lisp/emacs-lisp/generator.el (cps--make-dynamic-binding-wrapper): Remove extra evaluation of form. * test/lisp/emacs-lisp/generator-tests.el (cps-iter-lambda-with-dynamic-binding): New test.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/generator.el3
1 files changed, 1 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/generator.el b/lisp/emacs-lisp/generator.el
index f3597cc387d..3e9885900cf 100644
--- a/lisp/emacs-lisp/generator.el
+++ b/lisp/emacs-lisp/generator.el
@@ -142,8 +142,7 @@ the CPS state machinery.
`(let ((,dynamic-var ,static-var))
(unwind-protect ; Update the static shadow after evaluation is done
,form
- (setf ,static-var ,dynamic-var))
- ,form)))
+ (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