aboutsummaryrefslogtreecommitdiffstats
path: root/src/keyboard.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/keyboard.c')
-rw-r--r--src/keyboard.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/src/keyboard.c b/src/keyboard.c
index 50b2ade8ee4..9ff19d61d41 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -10213,7 +10213,7 @@ DEFUN ("read-key-sequence-vector", Fread_key_sequence_vector,
10213 10213
10214 memset (keybuf, 0, sizeof keybuf); 10214 memset (keybuf, 0, sizeof keybuf);
10215 GCPRO1 (keybuf[0]); 10215 GCPRO1 (keybuf[0]);
10216 gcpro1.nvars = (sizeof keybuf/sizeof (keybuf[0])); 10216 gcpro1.nvars = (sizeof keybuf / sizeof (keybuf[0]));
10217 10217
10218 if (NILP (continue_echo)) 10218 if (NILP (continue_echo))
10219 { 10219 {
@@ -10227,7 +10227,7 @@ DEFUN ("read-key-sequence-vector", Fread_key_sequence_vector,
10227 cancel_hourglass (); 10227 cancel_hourglass ();
10228#endif 10228#endif
10229 10229
10230 i = read_key_sequence (keybuf, (sizeof keybuf/sizeof (keybuf[0])), 10230 i = read_key_sequence (keybuf, (sizeof keybuf / sizeof (keybuf[0])),
10231 prompt, ! NILP (dont_downcase_last), 10231 prompt, ! NILP (dont_downcase_last),
10232 ! NILP (can_return_switch_frame), 0); 10232 ! NILP (can_return_switch_frame), 0);
10233 10233
@@ -10918,6 +10918,11 @@ interrupt_signal (int signalnum) /* If we don't have an argument, some */
10918 errno = old_errno; 10918 errno = old_errno;
10919} 10919}
10920 10920
10921/* If Emacs is stuck because `inhibit-quit' is true, then keep track
10922 of the number of times C-g has been requested. If C-g is pressed
10923 enough times, then quit anyway. See bug#6585. */
10924static int force_quit_count;
10925
10921/* This routine is called at interrupt level in response to C-g. 10926/* This routine is called at interrupt level in response to C-g.
10922 10927
10923 It is called from the SIGINT handler or kbd_buffer_store_event. 10928 It is called from the SIGINT handler or kbd_buffer_store_event.
@@ -11036,8 +11041,16 @@ handle_interrupt (void)
11036 UNGCPRO; 11041 UNGCPRO;
11037 } 11042 }
11038 else 11043 else
11039 /* Else request quit when it's safe */ 11044 { /* Else request quit when it's safe. */
11040 Vquit_flag = Qt; 11045 if (NILP (Vquit_flag))
11046 force_quit_count = 0;
11047 if (++force_quit_count == 3)
11048 {
11049 immediate_quit = 1;
11050 Vinhibit_quit = Qnil;
11051 }
11052 Vquit_flag = Qt;
11053 }
11041 } 11054 }
11042 11055
11043/* TODO: The longjmp in this call throws the NS event loop integration off, 11056/* TODO: The longjmp in this call throws the NS event loop integration off,