Commit c0335e02 authored by Stefan Monnier's avatar Stefan Monnier

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.
parent e8defde3
2010-03-05 Stefan Monnier <monnier@iro.umontreal.ca>
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.
* regex.c (regex_compile): Setup gl_state as well.
* syntax.c (skip_chars): Setup gl_state (bug#3823).
......
......@@ -393,6 +393,7 @@ unmark_byte_stack ()
Fsignal (Qquit, Qnil); \
AFTER_POTENTIAL_GC (); \
} \
ELSE_PENDING_SIGNALS \
} while (0)
......
......@@ -1933,22 +1933,12 @@ extern char *stack_bottom;
#ifdef SYNC_INPUT
extern void process_pending_signals P_ ((void));
extern int pending_signals;
#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); \
} \
else if (pending_signals) \
process_pending_signals (); \
} while (0)
#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 { \
......@@ -1960,10 +1950,9 @@ extern int pending_signals;
Fthrow (Vthrow_on_input, Qt); \
Fsignal (Qquit, Qnil); \
} \
ELSE_PENDING_SIGNALS \
} while (0)
#endif /* not SYNC_INPUT */
/* Nonzero if ought to quit now. */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment