Make sure that keyboard macro definition is terminated when ^G is
authorChris Hanson <org/chris-hanson/cph>
Wed, 15 Sep 1993 20:30:50 +0000 (20:30 +0000)
committerChris Hanson <org/chris-hanson/cph>
Wed, 15 Sep 1993 20:30:50 +0000 (20:30 +0000)
typed or when an error occurs.

v7/src/edwin/comred.scm

index 2f7db36cc4f28031f6c0cf63ab112bcf5ad3683a..0d3cf2207e7beffc29312fa193c6efa7ac36b2ca 100644 (file)
@@ -1,6 +1,6 @@
 ;;; -*-Scheme-*-
 ;;;
-;;;    $Id: comred.scm,v 1.105 1993/08/25 02:32:59 cph Exp $
+;;;    $Id: comred.scm,v 1.106 1993/09/15 20:30:50 cph Exp $
 ;;;
 ;;;    Copyright (c) 1986, 1989-93 Massachusetts Institute of Technology
 ;;;
   unspecific)
 \f
 (define (top-level-command-reader init)
-  (do ((init init #f)) (#f)
-    (with-keyboard-macro-disabled
-     (lambda ()
-       (bind-condition-handler (list condition-type:abort-current-command)
-          handle-abort-condition
-        (lambda () (command-reader init)))))))
+  (with-keyboard-macro-disabled
+   (lambda ()
+     (bind-condition-handler (list condition-type:abort-current-command)
+        handle-abort-condition
+       (lambda ()
+        (command-reader init))))))
 
 (define (command-reader #!optional initialization)
   (fluid-let ((*last-command* false)
 (define (return-to-command-loop input)
   (let ((restart (find-restart 'ABORT-EDITOR-COMMAND)))
     (if (not restart) (error "Missing ABORT-EDITOR-COMMAND restart."))
+    (keyboard-macro-disable)
     (invoke-restart restart input)))
 \f
 (define (get-next-keyboard-char)