From: Chris Hanson Date: Mon, 21 Jan 2019 04:22:28 +0000 (-0800) Subject: Don't return open block at top level when syntaxing a single form. X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=5d5a55094f3d35469d75585e776b4a3658ddd4c8;p=mit-scheme.git Don't return open block at top level when syntaxing a single form. (cherry picked from commit 71d9d70415cc836d245175a22bf9b937ae26ab15) --- 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*)