From 35d3b513d31907715da05d815b9ca0a13a206423 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 21 Jan 2004 05:24:01 +0000 Subject: [PATCH] (QUIT) [SYNC_INPUT]: Check interrupt_input_pending as well. --- src/lisp.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/lisp.h b/src/lisp.h index 72d24d79f05..b54668fb780 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -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)) -- 2.39.2