From 71d9d70415cc836d245175a22bf9b937ae26ab15 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Sun, 20 Jan 2019 20:22:28 -0800 Subject: [PATCH] Don't return open block at top level when syntaxing a single form. --- src/runtime/syntax.scm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/runtime/syntax.scm b/src/runtime/syntax.scm index 4aaca52e4..4bde7b012 100644 --- a/src/runtime/syntax.scm +++ b/src/runtime/syntax.scm @@ -47,7 +47,12 @@ USA. (make-settable-parameter #f)) (define (syntax form environment) - (syntax* (list form) environment)) + (let ((result (syntax* (list form) environment))) + (if (scode-open-block? result) + (unscan-defines (scode-open-block-names result) + (scode-open-block-declarations result) + (scode-open-block-actions result)) + result))) (define (syntax* forms environment) (guarantee list? forms 'syntax*) -- 2.25.1