From: Chris Hanson Date: Wed, 22 Feb 1989 07:16:34 +0000 (+0000) Subject: Don't treat data lists like combinations. X-Git-Tag: 20090517-FFI~12266 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=3ee973cc6234929ed2275b0c7755078a08efc159;p=mit-scheme.git Don't treat data lists like combinations. --- diff --git a/v7/src/runtime/pp.scm b/v7/src/runtime/pp.scm index 758e06ea1..3c2ffbc7a 100644 --- a/v7/src/runtime/pp.scm +++ b/v7/src/runtime/pp.scm @@ -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)) (define *named-lambda->define?* true) @@ -149,9 +150,15 @@ MIT in each case. |# (*unparse-char #\Newline)) (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)))) (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)