mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-01 09:51:22 -08:00
* src/keyboard.c: Override inhibit-quit after the third C-g.
(force_quit_count): New var. (handle_interrupt): Use it. Fixes: debbugs:6585
This commit is contained in:
parent
7dd02dc7c4
commit
6bbef4e552
2 changed files with 27 additions and 8 deletions
|
|
@ -1,3 +1,9 @@
|
|||
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
|
||||
|
|
@ -17,8 +23,8 @@
|
|||
* 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,
|
||||
|
|
@ -104,8 +110,8 @@
|
|||
(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.
|
||||
|
|
|
|||
|
|
@ -10213,7 +10213,7 @@ DEFUN ("read-key-sequence-vector", Fread_key_sequence_vector,
|
|||
|
||||
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))
|
||||
{
|
||||
|
|
@ -10227,7 +10227,7 @@ DEFUN ("read-key-sequence-vector", Fread_key_sequence_vector,
|
|||
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);
|
||||
|
||||
|
|
@ -10918,6 +10918,11 @@ interrupt_signal (int signalnum) /* If we don't have an argument, some */
|
|||
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.
|
||||
|
|
@ -11036,8 +11041,16 @@ handle_interrupt (void)
|
|||
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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue