]> git.eshelyaron.com Git - emacs.git/commitdiff
(QUIT) [SYNC_INPUT]: Check interrupt_input_pending as well.
authorStefan Monnier <monnier@iro.umontreal.ca>
Wed, 21 Jan 2004 05:24:01 +0000 (05:24 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Wed, 21 Jan 2004 05:24:01 +0000 (05:24 +0000)
src/lisp.h

index 72d24d79f057d3099ba2c8e43a7fac7674b26e5a..b54668fb7805836120d4277a16dd1d4331d1cf44 100644 (file)
@@ -1726,6 +1726,9 @@ extern char *stack_bottom;
    This is a good thing to do around a loop that has no side effects
    and (in particular) cannot call arbitrary Lisp code.  */
 
+#ifdef SYNC_INPUT
+extern void handle_async_input P_ ((void));
+extern int interrupt_input_pending;
 #define QUIT                                           \
   do {                                                 \
     if (!NILP (Vquit_flag) && NILP (Vinhibit_quit))    \
@@ -1733,8 +1736,24 @@ extern char *stack_bottom;
        Vquit_flag = Qnil;                              \
        Fsignal (Qquit, Qnil);                          \
       }                                                        \
+    else if (interrupt_input_pending)                  \
+      handle_async_input ();                           \
   } while (0)
 
+#else  /* not SYNC_INPUT */
+
+#define QUIT                                           \
+  do {                                                 \
+    if (!NILP (Vquit_flag) && NILP (Vinhibit_quit))    \
+      {                                                        \
+       Vquit_flag = Qnil;                              \
+       Fsignal (Qquit, Qnil);                          \
+      }                                                        \
+  } while (0)
+
+#endif /* not SYNC_INPUT */
+
+
 /* Nonzero if ought to quit now.  */
 
 #define QUITP (!NILP (Vquit_flag) && NILP (Vinhibit_quit))