From: Chris Hanson Date: Wed, 11 Jan 2017 06:45:47 +0000 (-0800) Subject: Change textual-port unparser method to be more standard. X-Git-Tag: mit-scheme-pucked-9.2.12~227^2~156 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=1fdd16086386ca5bb046ef4cc1ed55354f9eeaed;p=mit-scheme.git Change textual-port unparser method to be more standard. --- diff --git a/src/runtime/port.scm b/src/runtime/port.scm index 0cbdf7e79..0986af69c 100644 --- a/src/runtime/port.scm +++ b/src/runtime/port.scm @@ -463,19 +463,16 @@ USA. (define-port-operation discretionary-flush-output) (set-record-type-unparser-method! - (lambda (state port) - ((let ((name - (cond ((textual-i/o-port? port) 'TEXTUAL-I/O-PORT) - ((textual-input-port? port) 'TEXTUAL-INPUT-PORT) - ((textual-output-port? port) 'TEXTUAL-OUTPUT-PORT) - (else 'TEXTUAL-PORT)))) - (cond ((textual-port-operation port 'WRITE-SELF) - => (lambda (operation) - (standard-unparser-method name operation))) - (else - (standard-unparser-method name #f)))) - state - port))) + (standard-unparser-method + (lambda (port) + (cond ((textual-i/o-port? port) 'TEXTUAL-I/O-PORT) + ((textual-input-port? port) 'TEXTUAL-INPUT-PORT) + ((textual-output-port? port) 'TEXTUAL-OUTPUT-PORT) + (else 'TEXTUAL-PORT))) + (lambda (port output-port) + (cond ((textual-port-operation port 'WRITE-SELF) + => (lambda (operation) + (operation port output-port))))))) (define (port/copy port state) (let ((port (copy-record port)))