diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/keyboard.c | 11 |
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. */) | |||
| 996 | int count = SPECPDL_INDEX (); | 996 | int count = SPECPDL_INDEX (); |
| 997 | Lisp_Object buffer; | 997 | Lisp_Object buffer; |
| 998 | 998 | ||
| 999 | /* If we enter while input is blocked, don't lock up here. | ||
| 1000 | This may happen through the debugger during redisplay. */ | ||
| 1001 | if (INPUT_BLOCKED_P) | ||
| 1002 | return Qnil; | ||
| 1003 | |||
| 999 | command_loop_level++; | 1004 | command_loop_level++; |
| 1000 | update_mode_lines = 1; | 1005 | update_mode_lines = 1; |
| 1001 | 1006 | ||
| @@ -1294,6 +1299,12 @@ DEFUN ("top-level", Ftop_level, Stop_level, 0, 0, "", | |||
| 1294 | if (display_hourglass_p) | 1299 | if (display_hourglass_p) |
| 1295 | cancel_hourglass (); | 1300 | cancel_hourglass (); |
| 1296 | #endif | 1301 | #endif |
| 1302 | |||
| 1303 | /* Unblock input if we enter with input blocked. This may happen if | ||
| 1304 | redisplay traps e.g. during tool-bar update with input blocked. */ | ||
| 1305 | while (INPUT_BLOCKED_P) | ||
| 1306 | UNBLOCK_INPUT; | ||
| 1307 | |||
| 1297 | return Fthrow (Qtop_level, Qnil); | 1308 | return Fthrow (Qtop_level, Qnil); |
| 1298 | } | 1309 | } |
| 1299 | 1310 | ||