diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2010-03-05 18:08:18 -0500 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2010-03-05 18:08:18 -0500 |
commit | c0335e02ec7778c10fa110d8953f15990110e04b (patch) | |
tree | 5590b260ef5def04995f56862de4cde46f19ef59 | |
parent | e8defde36d0d4ab3dadd7f4a561a8c47ce110f9b (diff) | |
download | emacs-c0335e02ec7778c10fa110d8953f15990110e04b.tar.gz |
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.
-rw-r--r-- | src/ChangeLog | 5 | ||||
-rw-r--r-- | src/bytecode.c | 1 | ||||
-rw-r--r-- | src/lisp.h | 23 |
3 files changed, 12 insertions, 17 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index f7226d6fc6f..ce4fe1cd7b4 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,10 @@ 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). diff --git a/src/bytecode.c b/src/bytecode.c index 31df65fd303..e95614c72a9 100644 --- a/src/bytecode.c +++ b/src/bytecode.c @@ -393,6 +393,7 @@ unmark_byte_stack () Fsignal (Qquit, Qnil); \ AFTER_POTENTIAL_GC (); \ } \ + ELSE_PENDING_SIGNALS \ } while (0) diff --git a/src/lisp.h b/src/lisp.h index 7032a3f48f4..7f5d5df66c6 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -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. */ |