From e7907f648f3c576615c5ead2d9fc4fa156b6a97c Mon Sep 17 00:00:00 2001 From: David Thompson Date: Sun, 1 Dec 2013 21:29:21 -0500 Subject: Use dynamic-wind in with-window form. * 2d/window.scm (with-window): Use dynamic-wind. --- 2d/window.scm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to '2d') 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)))) -- cgit v1.2.3