Don't abort prompt when an input event arrives; process the event and
authorChris Hanson <org/chris-hanson/cph>
Mon, 30 Oct 2000 15:39:10 +0000 (15:39 +0000)
committerChris Hanson <org/chris-hanson/cph>
Mon, 30 Oct 2000 15:39:10 +0000 (15:39 +0000)
restart the prompt.  There may be subtle problems with this strategy;
find and fix them.

v7/src/edwin/basic.scm
v7/src/edwin/prompt.scm

index be61a677be2bf3da6b4650c27648dfcfac1775b3..beabb863b043a38fcfefe9f68393147f5df52f1b 100644 (file)
@@ -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!
index 0dafca6b2d7a30599865a232c5c0d0ad6a7bf1c4..08db894fbdbcbcf97be039d664dd47f6fda82813 100644 (file)
@@ -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))))