+2012-04-10 "Jason S. Cornez" <jcornez@ravenpack.com> (tiny change)
+
+ * keyboard.c: Override inhibit-quit after the third C-g (bug#6585).
+ (force_quit_count): New var.
+ (handle_interrupt): Use it.
+
2012-04-10 Juanma Barranquero <lekktu@gmail.com>
* w32.c (w32_delayed_load): Record the full path of the library
* process.h: Add integer `gnutls_handshakes_tried' member to
process struct.
- * gnutls.h: Add `GNUTLS_EMACS_HANDSHAKES_LIMIT' upper limit. Add
- convenience `GNUTLS_LOG2i' macro.
+ * gnutls.h: Add `GNUTLS_EMACS_HANDSHAKES_LIMIT' upper limit.
+ Add convenience `GNUTLS_LOG2i' macro.
* gnutls.c (gnutls_log_function2i): Convenience log function.
(emacs_gnutls_read): Use new log functions,
(xml_cleanup_parser): New function, export for fn_xmlCleanupParser.
Calls xmlCleanupParser only if libxml2 was loaded (or statically
linked in).
- (Flibxml_parse_html_region, Flibxml_parse_xml_region): Call
- init_libxml2_functions before calling libxml2 functions.
+ (Flibxml_parse_html_region, Flibxml_parse_xml_region):
+ Call init_libxml2_functions before calling libxml2 functions.
(syms_of_xml) <Qlibxml2_dll>: DEFSYM it.
* emacs.c: Don't include libxml/parser.h.
memset (keybuf, 0, sizeof keybuf);
GCPRO1 (keybuf[0]);
- gcpro1.nvars = (sizeof keybuf/sizeof (keybuf[0]));
+ gcpro1.nvars = (sizeof keybuf / sizeof (keybuf[0]));
if (NILP (continue_echo))
{
cancel_hourglass ();
#endif
- i = read_key_sequence (keybuf, (sizeof keybuf/sizeof (keybuf[0])),
+ i = read_key_sequence (keybuf, (sizeof keybuf / sizeof (keybuf[0])),
prompt, ! NILP (dont_downcase_last),
! NILP (can_return_switch_frame), 0);
errno = old_errno;
}
+/* If Emacs is stuck because `inhibit-quit' is true, then keep track
+ of the number of times C-g has been requested. If C-g is pressed
+ enough times, then quit anyway. See bug#6585. */
+static int force_quit_count;
+
/* This routine is called at interrupt level in response to C-g.
It is called from the SIGINT handler or kbd_buffer_store_event.
UNGCPRO;
}
else
- /* Else request quit when it's safe */
- Vquit_flag = Qt;
+ { /* Else request quit when it's safe. */
+ if (NILP (Vquit_flag))
+ force_quit_count = 0;
+ if (++force_quit_count == 3)
+ {
+ immediate_quit = 1;
+ Vinhibit_quit = Qnil;
+ }
+ Vquit_flag = Qt;
+ }
}
/* TODO: The longjmp in this call throws the NS event loop integration off,