From 77f70d1b3708846761e805680e901cf548fc59d8 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Fri, 22 Apr 1994 05:19:43 +0000 Subject: [PATCH] Change handling of inferior REPL output so that it does not affect the point of the inferior REPL buffer, and so that insertions to the right of the output mark remain to its right when output occurs. Additionally, implement new editor variable to control whether output from evaluation commands in other buffers cause the evaluation results to be written to the REPL buffer. --- v7/src/edwin/intmod.scm | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/v7/src/edwin/intmod.scm b/v7/src/edwin/intmod.scm index 7f45e745d..dd05ed470 100644 --- a/v7/src/edwin/intmod.scm +++ b/v7/src/edwin/intmod.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: intmod.scm,v 1.78 1994/04/22 05:05:34 cph Exp $ +;;; $Id: intmod.scm,v 1.79 1994/04/22 05:19:43 cph Exp $ ;;; ;;; Copyright (c) 1986, 1989-94 Massachusetts Institute of Technology ;;; @@ -718,14 +718,24 @@ If this is an error, the debugger examines the error condition." (apply min (map window-x-size windows))))))) (define (operation/write-result port expression value hash-number) - (let ((buffer (port/buffer port))) - (if (and (not (ref-variable inferior-repl-write-results buffer)) - (memq (operation/current-expression-context port expression) - '(EXPRESSION OTHER-BUFFER))) + (let ((buffer (port/buffer port)) + (other-buffer? + (memq (operation/current-expression-context port expression) + '(OTHER-BUFFER EXPRESSION)))) + (if (and other-buffer? + (not (ref-variable inferior-repl-write-results buffer))) (transcript-write value (and (ref-variable enable-transcript-buffer buffer) (transcript-buffer))) - (default/write-result port expression value hash-number)))) + (begin + (default/write-result port expression value hash-number) + (if (and other-buffer? (not (mark-visible? (port/mark port)))) + (transcript-write value #f)))))) + +(define (mark-visible? mark) + (there-exists? (buffer-windows (mark-buffer mark)) + (lambda (window) + (window-mark-visible? window mark)))) (define (enqueue-output-string! port string) (let ((interrupt-mask (set-interrupt-enables! interrupt-mask/gc-ok))) -- 2.25.1