Don't treat data lists like combinations.
authorChris Hanson <org/chris-hanson/cph>
Wed, 22 Feb 1989 07:16:34 +0000 (07:16 +0000)
committerChris Hanson <org/chris-hanson/cph>
Wed, 22 Feb 1989 07:16:34 +0000 (07:16 +0000)
v7/src/runtime/pp.scm

index 758e06ea1c2cabe84fc0f0b459671356ecbc66d7..3c2ffbc7afc63503881de9525477ad542510ed92 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/pp.scm,v 14.5 1989/02/09 03:45:36 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/pp.scm,v 14.6 1989/02/22 07:16:34 cph Rel $
 
 Copyright (c) 1988 Massachusetts Institute of Technology
 
@@ -52,6 +52,7 @@ MIT in each case. |#
          (DEFINE . ,print-procedure)
          (LAMBDA . ,print-procedure)
          (NAMED-LAMBDA . ,print-procedure)))
+  (set! dispatch-default print-combination)
   (set! walk-dispatcher default/walk-dispatcher))
 \f
 (define *named-lambda->define?* true)
@@ -149,9 +150,15 @@ MIT in each case. |#
   (*unparse-char #\Newline))
 \f
 (define (print-non-code-node node column depth)
-  (fluid-let ((dispatch-list '()))
+  (fluid-let ((dispatch-list '())
+             (dispatch-default print-data-column))
     (print-node node column depth)))
 
+(define (print-data-column nodes column depth)
+  (*unparse-open)
+  (print-column nodes (1+ column) (1+ depth))
+  (*unparse-close))
+
 (define (print-node node column depth)
   (cond ((list-node? node) (print-list-node node column depth))
        ((symbol? node) (*unparse-symbol node))
@@ -167,7 +174,7 @@ MIT in each case. |#
       (let ((subnodes (node-subnodes node)))
        ((or (let ((association (assq (car subnodes) dispatch-list)))
               (and association (cdr association)))
-            print-combination)
+            dispatch-default)
         subnodes column depth))))
 \f
 (define (print-guaranteed-node node)
@@ -222,6 +229,7 @@ MIT in each case. |#
   (*unparse-close))
 
 (define dispatch-list)
+(define dispatch-default)
 
 (define ((special-printer procedure) nodes column depth)
   (*unparse-open)