From b923747ac5e88e0c32b1b320e977432b24101dbe Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Fri, 18 Sep 2009 17:23:42 +0200 Subject: [PATCH] Protect from yield while waiting for keyboard input. --- src/keyboard.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/keyboard.c b/src/keyboard.c index 76e8197dc7f..4f9a77d1ba6 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -10329,10 +10329,13 @@ will read just one key sequence. */) if (display_hourglass_p) cancel_hourglass (); #endif + Finhibit_yield (Qt); + record_unwind_protect (Finhibit_yield, Qnil); i = read_key_sequence (keybuf, (sizeof keybuf/sizeof (keybuf[0])), prompt, ! NILP (dont_downcase_last), ! NILP (can_return_switch_frame), 0); + Finhibit_yield (Qnil); #if 0 /* The following is fine for code reading a key sequence and then proceeding with a lenghty computation, but it's not good -- 2.11.4.GIT