From 96edd5d493f862d85981a1c0432e7d07fe858c3c Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Mon, 17 May 2004 23:07:15 +0000 Subject: [PATCH] (Frecursive_edit): Return immediately if input blocked. (Ftop_level): Unblock input if blocked. --- src/keyboard.c | 11 +++++++++++ 1 file changed, 11 insertions(+) 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); } -- 2.39.5