summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKim F. Storm <storm@cua.dk>2004-05-17 23:07:15 +0000
committerKim F. Storm <storm@cua.dk>2004-05-17 23:07:15 +0000
commit96edd5d493f862d85981a1c0432e7d07fe858c3c (patch)
tree303e354f70265988da29788efc86655b937b3940
parentc2de28efe240194415d3030908ef24b383530689 (diff)
downloademacs-96edd5d493f862d85981a1c0432e7d07fe858c3c.tar.gz
(Frecursive_edit): Return immediately if input blocked.
(Ftop_level): Unblock input if blocked.
-rw-r--r--src/keyboard.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/keyboard.c b/src/keyboard.c
index 15a16150ee8..0102c5cd438 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -996,6 +996,11 @@ This function is called by the editor initialization to begin editing. */)
int count = SPECPDL_INDEX ();
Lisp_Object buffer;
+ /* If we enter while input is blocked, don't lock up here.
+ This may happen through the debugger during redisplay. */
+ if (INPUT_BLOCKED_P)
+ return Qnil;
+
command_loop_level++;
update_mode_lines = 1;
@@ -1294,6 +1299,12 @@ DEFUN ("top-level", Ftop_level, Stop_level, 0, 0, "",
if (display_hourglass_p)
cancel_hourglass ();
#endif
+
+ /* Unblock input if we enter with input blocked. This may happen if
+ redisplay traps e.g. during tool-bar update with input blocked. */
+ while (INPUT_BLOCKED_P)
+ UNBLOCK_INPUT;
+
return Fthrow (Qtop_level, Qnil);
}