Change references to LOCAL-ASSIGNMENT and LEXICAL-* to instead use
authorChris Hanson <org/chris-hanson/cph>
Wed, 19 Dec 2001 03:31:25 +0000 (03:31 +0000)
committerChris Hanson <org/chris-hanson/cph>
Wed, 19 Dec 2001 03:31:25 +0000 (03:31 +0000)
procedures in the environment abstraction.

v7/src/runtime/unpars.scm

index df1966b72003e9f4f210b658751925f85e29ff06..239f62904741572a5b9f1040760af4e48a0c63e4 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Id: unpars.scm,v 14.48 2001/06/15 20:38:51 cph Exp $
+$Id: unpars.scm,v 14.49 2001/12/19 03:31:25 cph Exp $
 
 Copyright (c) 1988-2001 Massachusetts Institute of Technology
 
@@ -613,9 +613,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 ;;;; Miscellaneous
 
 (define (unparse/environment environment)
-  (if (lexical-unreferenceable? environment ':PRINT-SELF)
-      (unparse/default environment)
-      ((lexical-reference environment ':PRINT-SELF))))
+  (let ((print-self
+        (ignore-errors
+         (lambda ()
+           (environment-lookup environment ':PRINT-SELF)))))
+    (if (and (procedure? print-self) (procedure-arity-valid? print-self 0))
+       (print-self)
+       (unparse/default environment))))
 
 (define (unparse/variable variable)
   (*unparse-with-brackets 'VARIABLE variable