From 1fdd16086386ca5bb046ef4cc1ed55354f9eeaed Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Tue, 10 Jan 2017 22:45:47 -0800 Subject: [PATCH] Change textual-port unparser method to be more standard. --- src/runtime/port.scm | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) 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))) -- 2.25.1