diff options
| author | Kim F. Storm | 2004-05-17 23:07:15 +0000 |
|---|---|---|
| committer | Kim F. Storm | 2004-05-17 23:07:15 +0000 |
| commit | 96edd5d493f862d85981a1c0432e7d07fe858c3c (patch) | |
| tree | 303e354f70265988da29788efc86655b937b3940 /src | |
| parent | c2de28efe240194415d3030908ef24b383530689 (diff) | |
| download | emacs-96edd5d493f862d85981a1c0432e7d07fe858c3c.tar.gz emacs-96edd5d493f862d85981a1c0432e7d07fe858c3c.zip | |
(Frecursive_edit): Return immediately if input blocked.
(Ftop_level): Unblock input if blocked.
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 | ||