diff options
author | David Thompson <dthompson2@worcester.edu> | 2013-12-01 21:29:21 -0500 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2013-12-01 21:29:21 -0500 |
commit | e7907f648f3c576615c5ead2d9fc4fa156b6a97c (patch) | |
tree | 88698af210b8d39d66f0dc1ab331b8bd722a804f /2d | |
parent | c57d365821ff9e8c13f2f001a535ba0e9399a135 (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.scm | 8 |
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)))) |