Mercurial > emacs
diff src/lisp.h @ 107338:feb1bc86a749
Make it possible to C-g in a tight bytecode loop again (bug#5680).
* lisp.h (ELSE_PENDING_SIGNALS): New macro.
(QUIT): Use it to consolidate code and remove redundancy.
* bytecode.c (BYTE_CODE_QUIT): Use it as well.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Fri, 05 Mar 2010 18:08:18 -0500 |
parents | ddd257e3f816 |
children | bef5d1738c0b c1fe9f79424a |
line wrap: on
line diff
--- a/src/lisp.h Fri Mar 05 15:18:20 2010 -0500 +++ b/src/lisp.h Fri Mar 05 18:08:18 2010 -0500 @@ -1933,6 +1933,12 @@ #ifdef SYNC_INPUT extern void process_pending_signals P_ ((void)); extern int pending_signals; +#define ELSE_PENDING_SIGNALS \ + else if (pending_signals) \ + process_pending_signals (); +#else /* not SYNC_INPUT */ +#define ELSE_PENDING_SIGNALS +#endif /* not SYNC_INPUT */ #define QUIT \ do { \ @@ -1944,26 +1950,9 @@ Fthrow (Vthrow_on_input, Qt); \ Fsignal (Qquit, Qnil); \ } \ - else if (pending_signals) \ - process_pending_signals (); \ + ELSE_PENDING_SIGNALS \ } while (0) -#else /* not SYNC_INPUT */ - -#define QUIT \ - do { \ - if (!NILP (Vquit_flag) && NILP (Vinhibit_quit)) \ - { \ - Lisp_Object flag = Vquit_flag; \ - Vquit_flag = Qnil; \ - if (EQ (Vthrow_on_input, flag)) \ - Fthrow (Vthrow_on_input, Qt); \ - Fsignal (Qquit, Qnil); \ - } \ - } while (0) - -#endif /* not SYNC_INPUT */ - /* Nonzero if ought to quit now. */