Remove unneeded environment arguments from various printers.
authorChris Hanson <org/chris-hanson/cph>
Sat, 12 May 2018 06:20:14 +0000 (23:20 -0700)
committerChris Hanson <org/chris-hanson/cph>
Sat, 12 May 2018 06:20:14 +0000 (23:20 -0700)
src/edwin/intmod.scm
src/runtime/emacs.scm
src/runtime/rep.scm
src/runtime/swank.scm
src/runtime/usrint.scm

index 7adec4590c5a95047a9908d34027d6f993b09181..2a8d5623e3cd003b1862bbb97aa6d811a8b69181 100644 (file)
@@ -904,7 +904,7 @@ If this is an error, the debugger examines the error condition."
           (and (not (null? windows))
                (apply min (map window-x-size windows)))))))
 
-(define (operation/write-result port expression value hash-number environment)
+(define (operation/write-result port expression value hash-number)
   (let ((buffer (port/buffer port))
        (other-buffer?
         (memq (operation/current-expression-context port expression)
@@ -915,7 +915,7 @@ If this is an error, the debugger examines the error condition."
                          (and (ref-variable enable-transcript-buffer buffer)
                               (transcript-buffer)))
        (begin
-         (default/write-result port expression value hash-number environment)
+         (default/write-result port expression value hash-number)
          (if (and other-buffer? (not (mark-visible? (port/mark port))))
              (transcript-write value #f))))))
 
index 85cbb234a19d391423b7f4fd66c063c6df0f1049..6964c8c6c4d653f35d5d2943eb0ee97411a4b713 100644 (file)
@@ -123,7 +123,7 @@ USA.
 \f
 ;;;; Miscellaneous Hooks
 
-(define (emacs/write-result port expression object hash-number environment)
+(define (emacs/write-result port expression object hash-number)
   expression
   (cond ((undefined-value? object)
         (transmit-signal-with-argument port #\v ""))
@@ -142,7 +142,7 @@ USA.
          port #\v
          (call-with-output-string
            (lambda (port)
-             (write object port environment)))))))
+             (write object port)))))))
 
 (define (emacs/error-decision repl condition)
   condition
index ac769e27bac3741e41a92d957959a1569d6def66..9b862ecb861e089597bc41d84dcdaa50145b2218 100644 (file)
@@ -494,12 +494,17 @@ USA.
    with-repl-eval-boundary
    repl))
 
-(define (repl-write value s-expression #!optional environment repl)
-  (receive (environment repl) (optional-er environment repl 'repl-write)
-    (hook/repl-write value s-expression environment repl)))
+(define (repl-write value s-expression #!optional repl)
+  (hook/repl-write value
+                  s-expression
+                  (if (default-object? repl)
+                      (nearest-repl)
+                      (begin
+                        (guarantee repl? repl 'repl-write)
+                        repl))))
 
 (define hook/repl-write)
-(define (default/repl-write object s-expression environment repl)
+(define (default/repl-write object s-expression repl)
   (port/write-result (cmdl/port repl)
                     s-expression
                     object
@@ -507,8 +512,7 @@ USA.
                          (object-pointer? object)
                          (not (interned-symbol? object))
                          (not (number? object))
-                         (hash-object object))
-                    environment))
+                         (hash-object object))))
 
 (define (repl-eval/write s-expression #!optional environment repl)
   (receive (environment repl) (optional-er environment repl 'repl-eval/write)
@@ -517,7 +521,6 @@ USA.
 (define (%repl-eval/write s-expression environment repl)
   (hook/repl-write (%repl-eval s-expression environment repl)
                   s-expression
-                  environment
                   repl))
 
 (define (optional-er environment repl caller)
index 155c02a004137432a32e33a6094c9e2f7fe69d7e..eff60c528a64fc33ba73c1afdb780cea6d347e45 100644 (file)
@@ -283,7 +283,7 @@ USA.
   (let ((value (repl-eval sexp socket)))
     (call-with-output-string
       (lambda (port)
-       (port/write-result port sexp value (hash-object value) (buffer-env))
+       (port/write-result port sexp value (hash-object value))
        (if nl? (newline port))))))
 
 (define (for-each-sexp procedure string)
index 63c4f6c5435a5f66106458615555e1d01b8245ed..adb8fe152066e0d1a53f368eba8bcc22d88ba93b 100644 (file)
@@ -323,18 +323,13 @@ USA.
 \f
 ;;;; Miscellaneous Hooks
 
-(define (port/write-result port expression value hash-number
-                          #!optional environment)
-  (let ((operation (textual-port-operation port 'write-result))
-       (environment
-        (if (default-object? environment)
-            (nearest-repl/environment)
-            (guarantee environment? environment 'port/write-result))))
+(define (port/write-result port expression value hash-number)
+  (let ((operation (textual-port-operation port 'write-result)))
     (if operation
-       (operation port expression value hash-number environment)
-       (default/write-result port expression value hash-number environment))))
+       (operation port expression value hash-number)
+       (default/write-result port expression value hash-number))))
 
-(define (default/write-result port expression object hash-number environment)
+(define (default/write-result port expression object hash-number)
   expression
   (if (not (nearest-cmdl/batch-mode?))
       (with-output-port-terminal-mode port 'cooked
@@ -349,9 +344,9 @@ USA.
                (if hash-number
                    (begin
                      (write-string " " port)
-                     (write hash-number port environment)))
+                     (write hash-number port)))
                (write-string ": " port)
-               (write object port environment)))))))
+               (write object port)))))))
 
 (define write-result:undefined-value-is-special? true)