Add switch to control behavior of PP when AS-CODE? argument is
authorChris Hanson <org/chris-hanson/cph>
Wed, 25 Mar 1992 23:51:57 +0000 (23:51 +0000)
committerChris Hanson <org/chris-hanson/cph>
Wed, 25 Mar 1992 23:51:57 +0000 (23:51 +0000)
defaulted.

v7/src/runtime/pp.scm
v7/src/runtime/runtime.pkg
v8/src/runtime/runtime.pkg

index e154b00de868ec5c6f5f10397248c5fd4c1ff72f..986ba6f535c19d96e9e5da42d8090758c2e1167a 100644 (file)
@@ -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)
index e72a978bd7b625c05c3ef653243c8011049477f7..e34834f5957ccf399559ea12f3763ea4d85f4df6 100644 (file)
@@ -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)
index ea7b2d52d94660dc3434063da345ec248be93657..dc1a009e50fc6314e3f739e65a49b0cef7438b8b 100644 (file)
@@ -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)