From: Giuseppe Scrivano Date: Fri, 18 Sep 2009 15:23:42 +0000 (+0200) Subject: Protect from yield while waiting for keyboard input. X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b923747ac5e88e0c32b1b320e977432b24101dbe;p=emacs.git Protect from yield while waiting for keyboard input. --- 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