diff options
| -rw-r--r-- | src/ChangeLog | 14 | ||||
| -rw-r--r-- | src/keyboard.c | 21 |
2 files changed, 27 insertions, 8 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 76a8353b853..994b8d034ff 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2012-04-10 "Jason S. Cornez" <jcornez@ravenpack.com> (tiny change) | ||
| 2 | |||
| 3 | * keyboard.c: Override inhibit-quit after the third C-g (bug#6585). | ||
| 4 | (force_quit_count): New var. | ||
| 5 | (handle_interrupt): Use it. | ||
| 6 | |||
| 1 | 2012-04-10 Juanma Barranquero <lekktu@gmail.com> | 7 | 2012-04-10 Juanma Barranquero <lekktu@gmail.com> |
| 2 | 8 | ||
| 3 | * w32.c (w32_delayed_load): Record the full path of the library | 9 | * w32.c (w32_delayed_load): Record the full path of the library |
| @@ -17,8 +23,8 @@ | |||
| 17 | * process.h: Add integer `gnutls_handshakes_tried' member to | 23 | * process.h: Add integer `gnutls_handshakes_tried' member to |
| 18 | process struct. | 24 | process struct. |
| 19 | 25 | ||
| 20 | * gnutls.h: Add `GNUTLS_EMACS_HANDSHAKES_LIMIT' upper limit. Add | 26 | * gnutls.h: Add `GNUTLS_EMACS_HANDSHAKES_LIMIT' upper limit. |
| 21 | convenience `GNUTLS_LOG2i' macro. | 27 | Add convenience `GNUTLS_LOG2i' macro. |
| 22 | 28 | ||
| 23 | * gnutls.c (gnutls_log_function2i): Convenience log function. | 29 | * gnutls.c (gnutls_log_function2i): Convenience log function. |
| 24 | (emacs_gnutls_read): Use new log functions, | 30 | (emacs_gnutls_read): Use new log functions, |
| @@ -104,8 +110,8 @@ | |||
| 104 | (xml_cleanup_parser): New function, export for fn_xmlCleanupParser. | 110 | (xml_cleanup_parser): New function, export for fn_xmlCleanupParser. |
| 105 | Calls xmlCleanupParser only if libxml2 was loaded (or statically | 111 | Calls xmlCleanupParser only if libxml2 was loaded (or statically |
| 106 | linked in). | 112 | linked in). |
| 107 | (Flibxml_parse_html_region, Flibxml_parse_xml_region): Call | 113 | (Flibxml_parse_html_region, Flibxml_parse_xml_region): |
| 108 | init_libxml2_functions before calling libxml2 functions. | 114 | Call init_libxml2_functions before calling libxml2 functions. |
| 109 | (syms_of_xml) <Qlibxml2_dll>: DEFSYM it. | 115 | (syms_of_xml) <Qlibxml2_dll>: DEFSYM it. |
| 110 | 116 | ||
| 111 | * emacs.c: Don't include libxml/parser.h. | 117 | * emacs.c: Don't include libxml/parser.h. |
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. */ | ||
| 10924 | static 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, |