From: Chris Hanson Date: Mon, 30 Oct 2000 15:39:10 +0000 (+0000) Subject: Don't abort prompt when an input event arrives; process the event and X-Git-Tag: 20090517-FFI~3203 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=0196005ea7d15fab94582bf5f87b0b3d8e179023;p=mit-scheme.git Don't abort prompt when an input event arrives; process the event and restart the prompt. There may be subtle problems with this strategy; find and fix them. --- diff --git a/v7/src/edwin/basic.scm b/v7/src/edwin/basic.scm index be61a677b..beabb863b 100644 --- a/v7/src/edwin/basic.scm +++ b/v7/src/edwin/basic.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: basic.scm,v 1.139 2000/06/05 17:44:58 cph Exp $ +;;; $Id: basic.scm,v 1.140 2000/10/30 15:39:06 cph Exp $ ;;; ;;; Copyright (c) 1986, 1989-2000 Massachusetts Institute of Technology ;;; @@ -196,14 +196,17 @@ It reads another character (a subcommand) and dispatches on it." () (lambda () (set-command-prompt-prefix!) - (let ((input (with-editor-interrupts-disabled keyboard-read))) - (if (input-event? input) - (apply-input-event input) - (dispatch-on-key (current-comtabs) - (let ((prefix-key (current-command-key))) - ((if (pair? prefix-key) append cons) - prefix-key - (list input)))))))) + (let loop () + (let ((input (with-editor-interrupts-disabled keyboard-read))) + (if (input-event? input) + (begin + (apply-input-event input) + (loop)) + (dispatch-on-key (current-comtabs) + (let ((prefix-key (current-command-key))) + ((if (pair? prefix-key) append cons) + prefix-key + (list input))))))))) (define (set-command-prompt-prefix!) (set-command-prompt! diff --git a/v7/src/edwin/prompt.scm b/v7/src/edwin/prompt.scm index 0dafca6b2..08db894fb 100644 --- a/v7/src/edwin/prompt.scm +++ b/v7/src/edwin/prompt.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: prompt.scm,v 1.189 2000/10/26 02:28:22 cph Exp $ +;;; $Id: prompt.scm,v 1.190 2000/10/30 15:39:10 cph Exp $ ;;; ;;; Copyright (c) 1986, 1989-2000 Massachusetts Institute of Technology ;;; @@ -86,7 +86,8 @@ (cond ((condition? value) (signal-condition value)) ((and (pair? value) (eq? (car value) typein-edit-abort-flag)) - (abort-current-command (cdr value))) + (apply-input-event (cdr value)) + (within-typein-edit thunk)) (else value))))