From c53d88b5cf532983c54595d5bba5d66f3c4af97f Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Tue, 30 Mar 2004 04:27:52 +0000 Subject: [PATCH] New port abstraction is hiding unread characters from the underlying port operations; consequently, the buffer-input implementation was returning the wrong value for the current mark. This has been kludged around. --- v7/src/edwin/bufinp.scm | 6 ++++-- v7/src/edwin/edwin.pkg | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/v7/src/edwin/bufinp.scm b/v7/src/edwin/bufinp.scm index 1c63073dc..783d7dac1 100644 --- a/v7/src/edwin/bufinp.scm +++ b/v7/src/edwin/bufinp.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: bufinp.scm,v 1.12 2004/02/16 05:42:49 cph Exp $ +$Id: bufinp.scm,v 1.13 2004/03/30 04:27:48 cph Exp $ Copyright 1989,1990,1991,1999,2004 Massachusetts Institute of Technology @@ -71,7 +71,9 @@ USA. ,(lambda (port) (let ((state (port/state port))) (make-mark (bstate-group state) - (bstate-start state))))) + (if (port/unread port) + (- (bstate-start state) 1) + (bstate-start state)))))) (CHAR-READY? ,(lambda (port) (let ((state (port/state port))) diff --git a/v7/src/edwin/edwin.pkg b/v7/src/edwin/edwin.pkg index ecb7ac26f..253d3b450 100644 --- a/v7/src/edwin/edwin.pkg +++ b/v7/src/edwin/edwin.pkg @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: edwin.pkg,v 1.287 2004/02/16 05:43:26 cph Exp $ +$Id: edwin.pkg,v 1.288 2004/03/30 04:27:52 cph Exp $ Copyright 1989,1990,1991,1992,1993,1994 Massachusetts Institute of Technology Copyright 1995,1996,1997,1998,1999,2000 Massachusetts Institute of Technology @@ -535,7 +535,9 @@ USA. (export (edwin) make-buffer-input-port with-input-from-mark - with-input-from-region)) + with-input-from-region) + (import (runtime port) + port/unread)) (define-package (edwin buffer-output-port) (files "bufout") -- 2.25.1