Don't output bare block declarations at top level; always wrap them in
authorChris Hanson <org/chris-hanson/cph>
Sat, 2 Mar 2002 04:31:41 +0000 (04:31 +0000)
committerChris Hanson <org/chris-hanson/cph>
Sat, 2 Mar 2002 04:31:41 +0000 (04:31 +0000)
an open block.  Otherwise, SF won't act on the declarations, just
passing them through to the compiler.

v7/src/runtime/syntax-output.scm

index b9dc4f28cb67cfbab70039388480b5cfb8d854bc..122a2a702d59c724aa351305b5d8cebddf98f2c0 100644 (file)
@@ -1,6 +1,6 @@
 ;;; -*-Scheme-*-
 ;;;
-;;; $Id: syntax-output.scm,v 14.4 2002/03/01 17:46:19 cph Exp $
+;;; $Id: syntax-output.scm,v 14.5 2002/03/02 04:31:41 cph Exp $
 ;;;
 ;;; Copyright (c) 1989-1991, 2001, 2002 Massachusetts Institute of Technology
 ;;;
         (lambda (expressions)
           (scan-defines (make-sequence expressions) make-open-block))))
     (if (pair? declarations)
-       (if (pair? expressions)
-           (make-open-block
-            (cons (make-block-declaration declarations)
-                  expressions))
-           (make-block-declaration declarations))
+       (make-open-block
+        (cons (make-block-declaration declarations)
+              (if (pair? expressions)
+                  expressions
+                  (list (output/unspecific)))))
        (if (pair? expressions)
            (if (pair? (cdr expressions))
                (make-open-block expressions)