From 5d5a55094f3d35469d75585e776b4a3658ddd4c8 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. (cherry picked from commit 71d9d70415cc836d245175a22bf9b937ae26ab15) --- 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 f76f5dd46..6673bdf00 100644 --- a/src/runtime/syntax.scm +++ b/src/runtime/syntax.scm @@ -44,7 +44,12 @@ USA. ;;;; Top level (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