diff options
| author | Paul Eggert | 2012-04-21 17:53:32 -0700 |
|---|---|---|
| committer | Paul Eggert | 2012-04-21 17:53:32 -0700 |
| commit | bbd347f5f7e99da1a559dad818b5fa8f59c0901e (patch) | |
| tree | 77c1fc54c2240b08d2859109d18cac8812a8ffb1 /src/keyboard.c | |
| parent | e4ecdc9c71af4199129d5dd2db1a32ff6b725fe4 (diff) | |
| parent | 9ee7d8b93cb143b473e6dffb708e777bc6fe5bd0 (diff) | |
| download | emacs-bbd347f5f7e99da1a559dad818b5fa8f59c0901e.tar.gz emacs-bbd347f5f7e99da1a559dad818b5fa8f59c0901e.zip | |
Merge from trunk.
Diffstat (limited to 'src/keyboard.c')
| -rw-r--r-- | src/keyboard.c | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index bad91ea3f72..79d9e7a18e8 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -7200,6 +7200,7 @@ handle_async_input (void) | |||
| 7200 | #endif | 7200 | #endif |
| 7201 | } | 7201 | } |
| 7202 | 7202 | ||
| 7203 | #ifdef SYNC_INPUT | ||
| 7203 | void | 7204 | void |
| 7204 | process_pending_signals (void) | 7205 | process_pending_signals (void) |
| 7205 | { | 7206 | { |
| @@ -7207,6 +7208,7 @@ process_pending_signals (void) | |||
| 7207 | handle_async_input (); | 7208 | handle_async_input (); |
| 7208 | do_pending_atimers (); | 7209 | do_pending_atimers (); |
| 7209 | } | 7210 | } |
| 7211 | #endif | ||
| 7210 | 7212 | ||
| 7211 | #ifdef SIGIO /* for entire page */ | 7213 | #ifdef SIGIO /* for entire page */ |
| 7212 | /* Note SIGIO has been undef'd if FIONREAD is missing. */ | 7214 | /* Note SIGIO has been undef'd if FIONREAD is missing. */ |
| @@ -10218,7 +10220,7 @@ DEFUN ("read-key-sequence-vector", Fread_key_sequence_vector, | |||
| 10218 | 10220 | ||
| 10219 | memset (keybuf, 0, sizeof keybuf); | 10221 | memset (keybuf, 0, sizeof keybuf); |
| 10220 | GCPRO1 (keybuf[0]); | 10222 | GCPRO1 (keybuf[0]); |
| 10221 | gcpro1.nvars = (sizeof keybuf/sizeof (keybuf[0])); | 10223 | gcpro1.nvars = (sizeof keybuf / sizeof (keybuf[0])); |
| 10222 | 10224 | ||
| 10223 | if (NILP (continue_echo)) | 10225 | if (NILP (continue_echo)) |
| 10224 | { | 10226 | { |
| @@ -10232,7 +10234,7 @@ DEFUN ("read-key-sequence-vector", Fread_key_sequence_vector, | |||
| 10232 | cancel_hourglass (); | 10234 | cancel_hourglass (); |
| 10233 | #endif | 10235 | #endif |
| 10234 | 10236 | ||
| 10235 | i = read_key_sequence (keybuf, (sizeof keybuf/sizeof (keybuf[0])), | 10237 | i = read_key_sequence (keybuf, (sizeof keybuf / sizeof (keybuf[0])), |
| 10236 | prompt, ! NILP (dont_downcase_last), | 10238 | prompt, ! NILP (dont_downcase_last), |
| 10237 | ! NILP (can_return_switch_frame), 0); | 10239 | ! NILP (can_return_switch_frame), 0); |
| 10238 | 10240 | ||
| @@ -10923,6 +10925,11 @@ interrupt_signal (int signalnum) /* If we don't have an argument, some */ | |||
| 10923 | errno = old_errno; | 10925 | errno = old_errno; |
| 10924 | } | 10926 | } |
| 10925 | 10927 | ||
| 10928 | /* If Emacs is stuck because `inhibit-quit' is true, then keep track | ||
| 10929 | of the number of times C-g has been requested. If C-g is pressed | ||
| 10930 | enough times, then quit anyway. See bug#6585. */ | ||
| 10931 | static int force_quit_count; | ||
| 10932 | |||
| 10926 | /* This routine is called at interrupt level in response to C-g. | 10933 | /* This routine is called at interrupt level in response to C-g. |
| 10927 | 10934 | ||
| 10928 | It is called from the SIGINT handler or kbd_buffer_store_event. | 10935 | It is called from the SIGINT handler or kbd_buffer_store_event. |
| @@ -11041,8 +11048,16 @@ handle_interrupt (void) | |||
| 11041 | UNGCPRO; | 11048 | UNGCPRO; |
| 11042 | } | 11049 | } |
| 11043 | else | 11050 | else |
| 11044 | /* Else request quit when it's safe */ | 11051 | { /* Else request quit when it's safe. */ |
| 11045 | Vquit_flag = Qt; | 11052 | if (NILP (Vquit_flag)) |
| 11053 | force_quit_count = 0; | ||
| 11054 | if (++force_quit_count == 3) | ||
| 11055 | { | ||
| 11056 | immediate_quit = 1; | ||
| 11057 | Vinhibit_quit = Qnil; | ||
| 11058 | } | ||
| 11059 | Vquit_flag = Qt; | ||
| 11060 | } | ||
| 11046 | } | 11061 | } |
| 11047 | 11062 | ||
| 11048 | /* TODO: The longjmp in this call throws the NS event loop integration off, | 11063 | /* TODO: The longjmp in this call throws the NS event loop integration off, |