From eb4208eb3fc6a851bc60102cccf31987151335ff Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Wed, 25 Mar 1992 23:51:57 +0000 Subject: [PATCH] Add switch to control behavior of PP when AS-CODE? argument is defaulted. --- v7/src/runtime/pp.scm | 10 +++++++--- v7/src/runtime/runtime.pkg | 5 +++-- v8/src/runtime/runtime.pkg | 5 +++-- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/v7/src/runtime/pp.scm b/v7/src/runtime/pp.scm index e154b00de..986ba6f53 100644 --- a/v7/src/runtime/pp.scm +++ b/v7/src/runtime/pp.scm @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/pp.scm,v 14.23 1991/11/26 07:06:47 cph Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/pp.scm,v 14.24 1992/03/25 23:51:47 cph Exp $ -Copyright (c) 1988-91 Massachusetts Institute of Technology +Copyright (c) 1988-92 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -65,6 +65,7 @@ MIT in each case. |# (define *pp-lists-as-tables?* true) (define *pp-forced-x-size* false) (define *pp-avoid-circularity?* false) +(define *pp-default-as-code?* 'IF-SCODE) (define (pp object #!optional port . rest) (let ((port (if (default-object? port) (current-output-port) port))) @@ -85,7 +86,10 @@ MIT in each case. |# (define (pretty-print object #!optional port as-code? indentation) (let ((as-code? (if (default-object? as-code?) - (not (scode-constant? object)) + (let ((default *pp-default-as-code?*)) + (if (boolean? default) + default + (not (scode-constant? object)))) as-code?))) (pp-top-level (let ((sexp (if (scode-constant? object) diff --git a/v7/src/runtime/runtime.pkg b/v7/src/runtime/runtime.pkg index e72a978bd..e34834f59 100644 --- a/v7/src/runtime/runtime.pkg +++ b/v7/src/runtime/runtime.pkg @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/runtime.pkg,v 14.139 1992/03/25 21:58:21 cph Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/runtime.pkg,v 14.140 1992/03/25 23:51:57 cph Exp $ Copyright (c) 1988-92 Massachusetts Institute of Technology @@ -1470,6 +1470,8 @@ MIT in each case. |# (files "pp") (parent ()) (export () + *pp-avoid-circularity?* + *pp-default-as-code?* *pp-forced-x-size* *pp-lists-as-tables?* *pp-named-lambda->define?* @@ -1477,7 +1479,6 @@ MIT in each case. |# *pp-primitives-by-name* *pp-save-vertical-space?* *pp-uninterned-symbols-by-name* - *pp-avoid-circularity?* make-pretty-printer-highlight pp pretty-print) diff --git a/v8/src/runtime/runtime.pkg b/v8/src/runtime/runtime.pkg index ea7b2d52d..dc1a009e5 100644 --- a/v8/src/runtime/runtime.pkg +++ b/v8/src/runtime/runtime.pkg @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/runtime/runtime.pkg,v 14.139 1992/03/25 21:58:21 cph Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/runtime/runtime.pkg,v 14.140 1992/03/25 23:51:57 cph Exp $ Copyright (c) 1988-92 Massachusetts Institute of Technology @@ -1470,6 +1470,8 @@ MIT in each case. |# (files "pp") (parent ()) (export () + *pp-avoid-circularity?* + *pp-default-as-code?* *pp-forced-x-size* *pp-lists-as-tables?* *pp-named-lambda->define?* @@ -1477,7 +1479,6 @@ MIT in each case. |# *pp-primitives-by-name* *pp-save-vertical-space?* *pp-uninterned-symbols-by-name* - *pp-avoid-circularity?* make-pretty-printer-highlight pp pretty-print) -- 2.25.1