Implement current-error-port.
authorChris Hanson <org/chris-hanson/cph>
Wed, 9 May 2018 04:59:47 +0000 (21:59 -0700)
committerChris Hanson <org/chris-hanson/cph>
Wed, 9 May 2018 04:59:47 +0000 (21:59 -0700)
src/runtime/runtime.pkg
src/runtime/textual-port.scm

index 9ee61acf4f42e6d3980a0a4d71d0ab7e5d734b78..1a068da876272a3d74cd1201162f76260057549c 100644 (file)
@@ -2667,12 +2667,10 @@ USA.
          with-output-to-port
          with-trace-output-port)
   (export ()
-         ;; Temporary definition to satisfy R7RS
-         ;; TODO(cph): provide a proper definition
-         (current-error-port current-output-port)
          close-input-port
          close-output-port
          close-port
+         current-error-port
          current-input-port
          current-output-port
          i/o-port?
index 55c09c15b40b1c30c83f09bd9b86ff78a40c816b..e853b51237e6a5ab87f87f62c0acd2c832769d1e 100644 (file)
@@ -763,19 +763,12 @@ USA.
 \f
 ;;;; Standard Ports
 
-(define current-input-port)
-(define current-output-port)
-(define notification-output-port)
-(define trace-output-port)
-(define interaction-i/o-port)
-(add-boot-init!
- (lambda ()
-   (set! current-input-port (make-port-parameter input-port?))
-   (set! current-output-port (make-port-parameter output-port?))
-   (set! notification-output-port (make-port-parameter output-port?))
-   (set! trace-output-port (make-port-parameter output-port?))
-   (set! interaction-i/o-port (make-port-parameter i/o-port?))
-   unspecific))
+(define-deferred current-input-port (make-port-parameter input-port?))
+(define-deferred current-output-port (make-port-parameter output-port?))
+(define-deferred current-error-port (make-port-parameter output-port?))
+(define-deferred notification-output-port (make-port-parameter output-port?))
+(define-deferred trace-output-port (make-port-parameter output-port?))
+(define-deferred interaction-i/o-port (make-port-parameter i/o-port?))
 
 (define (make-port-parameter predicate)
   (make-general-parameter #f