* Change handling of ^G interrupts and of ABORT-CURRENT-COMMAND. Both
authorChris Hanson <org/chris-hanson/cph>
Mon, 2 Aug 1993 04:22:51 +0000 (04:22 +0000)
committerChris Hanson <org/chris-hanson/cph>
Mon, 2 Aug 1993 04:22:51 +0000 (04:22 +0000)
  now use the condition system; ^G conditions are a specialization of
  ABORT-CURRENT-COMMAND conditions.  This change makes it easy to bind
  some action to occur when a command is aborted for whatever reason.
  Consequently, the procedure INTERCEPT-^G-INTERRUPTS has been
  deleted.

* The inferior thread output mechanism has been modified to allow a
  thread to request that the editor exit the keyboard reader and
  return to the command reader.  The request is phrased by the thread
  output procedure returning 'FORCE-RETURN.  This new mechanism is
  used by the inferior REPL code to force the command reader to
  immediately execute a command override for an unsolicited prompt.

* Aborting an unsolicited prompt causes the associated inferior thread
  to execute ABORT->NEAREST.

* Inferior REPL buffers now initialize their working directory to the
  default directory of the selected buffer at the time the REPL buffer
  is created.

* Inferior REPL buffers now have their own bindings of %EXIT and QUIT
  that affect only the inferior thread.  In particular, %EXIT kills
  the inferior thread but leaves Scheme running; QUIT does nothing.

v7/src/edwin/tterm.scm

index 5024ca1b105c2accb10523915946507f9ffaf430..54e57c982510771b6a8d95dd7ecfd54decc3aed5 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Id: tterm.scm,v 1.21 1993/08/01 00:16:01 cph Exp $
+$Id: tterm.scm,v 1.22 1993/08/02 04:22:51 cph Exp $
 
 Copyright (c) 1990-1993 Massachusetts Institute of Technology
 
@@ -187,12 +187,13 @@ MIT in each case. |#
         (guarantee-result
          (lambda ()
            (let ((event (read-event #t)))
-             (cond ((char? event)
-                    event)
+             (cond ((char? event) event)
                    ((process-change-event event)
-                    (make-input-event 'UPDATE update-screens! #f))
-                   (else
-                    (guarantee-result)))))))
+                    => (lambda (flag)
+                         (make-input-event
+                          (if (eq? flag 'FORCE-RETURN) 'RETURN 'UPDATE)
+                          update-screens! #f)))
+                   (else (guarantee-result)))))))
       (values
        (lambda ()                      ;halt-update?
         (or (fix:< start end)