From 8337ba46efa244830d548692bdbbb3290f5b0728 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Thu, 17 Feb 2005 17:52:08 +0000 Subject: [PATCH] Make peek operation send character to transcript if necessary. --- v7/src/runtime/port.scm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/v7/src/runtime/port.scm b/v7/src/runtime/port.scm index fd849c5db..e0ab979b5 100644 --- a/v7/src/runtime/port.scm +++ b/v7/src/runtime/port.scm @@ -1,9 +1,9 @@ #| -*-Scheme-*- -$Id: port.scm,v 1.36 2004/11/19 06:59:50 cph Exp $ +$Id: port.scm,v 1.37 2005/02/17 17:52:08 cph Exp $ Copyright 1991,1992,1993,1994,1997,1999 Massachusetts Institute of Technology -Copyright 2001,2002,2003,2004 Massachusetts Institute of Technology +Copyright 2001,2002,2003,2004,2005 Massachusetts Institute of Technology This file is part of MIT/GNU Scheme. @@ -346,7 +346,8 @@ USA. (set-port/unread! port #f) char) (let ((char (defer port))) - (transcribe-char char port) + (if (char? char) + (transcribe-char char port)) char)))))) (unread-char (lambda (port char) @@ -360,7 +361,9 @@ USA. (or (port/unread port) (let ((char (defer port))) (if (char? char) - (set-port/unread! port char)) + (begin + (set-port/unread! port char) + (transcribe-char char port))) char))))) (discard-char (lambda (port) -- 2.25.1