diff options
| author | Richard M. Stallman | 2002-07-12 11:18:36 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2002-07-12 11:18:36 +0000 |
| commit | 10ffcb6423b7d6f664cbe22c95ce54d9e598dceb (patch) | |
| tree | 34c71a93b8389a77ec1da546e54e1f5db7a97d06 /src | |
| parent | 26631f2b58f96dfa01644457743efca2297e391e (diff) | |
| download | emacs-10ffcb6423b7d6f664cbe22c95ce54d9e598dceb.tar.gz emacs-10ffcb6423b7d6f664cbe22c95ce54d9e598dceb.zip | |
(cmd_error_internal): Handle Vsignaling_function here.
(command_loop_1): Avoid certain actions after memory-full error.
Diffstat (limited to 'src')
| -rw-r--r-- | src/keyboard.c | 55 |
1 files changed, 35 insertions, 20 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index acd26a957c0..7a202fc7eaa 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -1199,6 +1199,16 @@ cmd_error_internal (data, context) | |||
| 1199 | Fdiscard_input (); | 1199 | Fdiscard_input (); |
| 1200 | bitch_at_user (); | 1200 | bitch_at_user (); |
| 1201 | stream = Qt; | 1201 | stream = Qt; |
| 1202 | |||
| 1203 | /* If we know from where the error was signaled, show it in | ||
| 1204 | *Messages*. */ | ||
| 1205 | if (!NILP (Vsignaling_function) && SYMBOLP (Vsignaling_function)) | ||
| 1206 | { | ||
| 1207 | char *name = XSTRING (SYMBOL_NAME (Vsignaling_function))->data; | ||
| 1208 | message_dolog (name, strlen (name), 0, 0); | ||
| 1209 | message_dolog (": ", 2, 0, 0); | ||
| 1210 | Vsignaling_function = Qnil; | ||
| 1211 | } | ||
| 1202 | } | 1212 | } |
| 1203 | 1213 | ||
| 1204 | if (context != 0) | 1214 | if (context != 0) |
| @@ -1349,31 +1359,36 @@ command_loop_1 () | |||
| 1349 | this_command_key_count = 0; | 1359 | this_command_key_count = 0; |
| 1350 | this_single_command_key_start = 0; | 1360 | this_single_command_key_start = 0; |
| 1351 | 1361 | ||
| 1352 | /* Make sure this hook runs after commands that get errors and | 1362 | if (! NILP (Vmemory_full)) |
| 1353 | throw to top level. */ | 1363 | { |
| 1354 | /* Note that the value cell will never directly contain nil | 1364 | /* Make sure this hook runs after commands that get errors and |
| 1355 | if the symbol is a local variable. */ | 1365 | throw to top level. */ |
| 1356 | if (!NILP (Vpost_command_hook) && !NILP (Vrun_hooks)) | 1366 | /* Note that the value cell will never directly contain nil |
| 1357 | safe_run_hooks (Qpost_command_hook); | 1367 | if the symbol is a local variable. */ |
| 1368 | if (!NILP (Vpost_command_hook) && !NILP (Vrun_hooks)) | ||
| 1369 | safe_run_hooks (Qpost_command_hook); | ||
| 1358 | 1370 | ||
| 1359 | /* If displaying a message, resize the echo area window to fit | 1371 | /* If displaying a message, resize the echo area window to fit |
| 1360 | that message's size exactly. */ | 1372 | that message's size exactly. */ |
| 1361 | if (!NILP (echo_area_buffer[0])) | 1373 | if (!NILP (echo_area_buffer[0])) |
| 1362 | resize_echo_area_exactly (); | 1374 | resize_echo_area_exactly (); |
| 1363 | 1375 | ||
| 1364 | if (!NILP (Vdeferred_action_list)) | 1376 | if (!NILP (Vdeferred_action_list)) |
| 1365 | call0 (Vdeferred_action_function); | 1377 | call0 (Vdeferred_action_function); |
| 1366 | 1378 | ||
| 1367 | if (!NILP (Vpost_command_idle_hook) && !NILP (Vrun_hooks)) | 1379 | if (!NILP (Vpost_command_idle_hook) && !NILP (Vrun_hooks)) |
| 1368 | { | 1380 | { |
| 1369 | if (NILP (Vunread_command_events) | 1381 | if (NILP (Vunread_command_events) |
| 1370 | && NILP (Vunread_input_method_events) | 1382 | && NILP (Vunread_input_method_events) |
| 1371 | && NILP (Vunread_post_input_method_events) | 1383 | && NILP (Vunread_post_input_method_events) |
| 1372 | && NILP (Vexecuting_macro) | 1384 | && NILP (Vexecuting_macro) |
| 1373 | && !NILP (sit_for (0, post_command_idle_delay, 0, 1, 1))) | 1385 | && !NILP (sit_for (0, post_command_idle_delay, 0, 1, 1))) |
| 1374 | safe_run_hooks (Qpost_command_idle_hook); | 1386 | safe_run_hooks (Qpost_command_idle_hook); |
| 1387 | } | ||
| 1375 | } | 1388 | } |
| 1376 | 1389 | ||
| 1390 | Vmemory_full = Qnil; | ||
| 1391 | |||
| 1377 | /* Do this after running Vpost_command_hook, for consistency. */ | 1392 | /* Do this after running Vpost_command_hook, for consistency. */ |
| 1378 | current_kboard->Vlast_command = Vthis_command; | 1393 | current_kboard->Vlast_command = Vthis_command; |
| 1379 | current_kboard->Vreal_last_command = real_this_command; | 1394 | current_kboard->Vreal_last_command = real_this_command; |