summary refs log tree commit diff
path: root/mew.scm
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2022-11-11 21:21:26 +0100
committerLeah Neukirchen <leah@vuxu.org>2022-11-11 21:21:34 +0100
commit9c2cf3e8ae31de4aa519aff876563172aefcd99c (patch)
tree80423663b25b79327b73ae3178d77bf65f0988ac /mew.scm
parentf232e1a585600152a975f7d66291edf145a3fda7 (diff)
downloadmew-9c2cf3e8ae31de4aa519aff876563172aefcd99c.tar.gz
mew-9c2cf3e8ae31de4aa519aff876563172aefcd99c.tar.xz
mew-9c2cf3e8ae31de4aa519aff876563172aefcd99c.zip
esc: when called without arguments, return void
Diffstat (limited to 'mew.scm')
-rw-r--r--mew.scm9
1 files changed, 6 insertions, 3 deletions
diff --git a/mew.scm b/mew.scm
index 92197b3..10a1f41 100644
--- a/mew.scm
+++ b/mew.scm
@@ -191,9 +191,12 @@
   (define-syntax esc
     (syntax-rules ()
       ((_ return body ...)
-       (call-with-current-continuation
-         (lambda (return)
-           (seq body ...))))))
+       (receive vals (call-with-current-continuation
+                      (lambda (return)
+                        (seq body ...)))
+         (if (null? vals)
+           (void)
+           (car vals))))))         
 
   (define-syntax fin
     (syntax-rules ()