From: Stephen Adams Date: Sat, 13 May 1995 19:01:38 +0000 (+0000) Subject: Fixed prefix nodes to compose with highlighted nodes. X-Git-Tag: 20090517-FFI~6315 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=fdffed0badc2ae41275519923c18d9b21066ecd3;p=mit-scheme.git Fixed prefix nodes to compose with highlighted nodes. --- diff --git a/v7/src/runtime/pp.scm b/v7/src/runtime/pp.scm index f07e0a713..e144de8b7 100644 --- a/v7/src/runtime/pp.scm +++ b/v7/src/runtime/pp.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: pp.scm,v 14.34 1995/03/04 00:39:48 cph Exp $ +$Id: pp.scm,v 14.35 1995/05/13 19:01:38 adams Exp $ Copyright (c) 1988-95 Massachusetts Institute of Technology @@ -1141,16 +1141,16 @@ MIT in each case. |# (subnode false read-only true)) (define (make-prefix-node prefix subnode) - (cond ((or (list-node? subnode) - (symbol? subnode)) - (%make-prefix-node (+ (string-length prefix) (node-size subnode)) - prefix - subnode)) + (cond ((string? subnode) + (string-append prefix subnode)) ((prefix-node? subnode) (make-prefix-node (string-append prefix (prefix-node-prefix subnode)) (prefix-node-subnode subnode))) (else - (string-append prefix subnode)))) + (%make-prefix-node (+ (string-length prefix) (node-size subnode)) + prefix + subnode)))) + (define (make-list-node car-node cdr-node) (cons (+ 1 (node-size car-node) (list-node-size cdr-node)) ;+1 space.