summaryrefslogtreecommitdiff
path: root/2d
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2013-12-01 21:29:21 -0500
committerDavid Thompson <dthompson2@worcester.edu>2013-12-01 21:29:21 -0500
commite7907f648f3c576615c5ead2d9fc4fa156b6a97c (patch)
tree88698af210b8d39d66f0dc1ab331b8bd722a804f /2d
parentc57d365821ff9e8c13f2f001a535ba0e9399a135 (diff)
Use dynamic-wind in with-window form.
* 2d/window.scm (with-window): Use dynamic-wind.
Diffstat (limited to '2d')
-rw-r--r--2d/window.scm8
1 files changed, 4 insertions, 4 deletions
diff --git a/2d/window.scm b/2d/window.scm
index 4c967de..f5f16b8 100644
--- a/2d/window.scm
+++ b/2d/window.scm
@@ -81,7 +81,7 @@
(SDL:quit))
(define-syntax-rule (with-window window body ...)
- (begin
- (open-window window)
- body ...
- (close-window)))
+ (dynamic-wind
+ (lambda () (open-window window))
+ (lambda () body ...)
+ (lambda () (close-window))))