Mercurial > emacs
comparison src/keyboard.c @ 46572:765f9cd60063
(cmd_error_internal): Pass Vsignaling_function
and CONTEXT to print_error_message, don't print them here.
For a Quit, don't use Vsignaling_function.
Call message_log_maybe_newline.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 20 Jul 2002 21:47:00 +0000 |
parents | 31de99e267b3 |
children | 175cd09f34d2 |
comparison
equal
deleted
inserted
replaced
46571:00e7aef43c61 | 46572:765f9cd60063 |
---|---|
1200 kill_emacs_p = 1; | 1200 kill_emacs_p = 1; |
1201 } | 1201 } |
1202 else | 1202 else |
1203 { | 1203 { |
1204 Fdiscard_input (); | 1204 Fdiscard_input (); |
1205 message_log_maybe_newline (); | |
1205 bitch_at_user (); | 1206 bitch_at_user (); |
1206 stream = Qt; | 1207 stream = Qt; |
1207 | 1208 } |
1208 /* If we know from where the error was signaled, show it in | 1209 |
1209 *Messages*. */ | 1210 /* The immediate context is not interesting for Quits, |
1210 if (!NILP (Vsignaling_function) && SYMBOLP (Vsignaling_function)) | 1211 since they are asyncronous. */ |
1211 { | 1212 if (EQ (XCAR (data), Qquit)) |
1212 const char *name = SDATA (SYMBOL_NAME (Vsignaling_function)); | 1213 Vsignaling_function = Qnil; |
1213 message_dolog (name, strlen (name), 0, 0); | 1214 |
1214 message_dolog (": ", 2, 0, 0); | 1215 print_error_message (data, stream, context, Vsignaling_function); |
1215 Vsignaling_function = Qnil; | 1216 |
1216 } | 1217 Vsignaling_function = Qnil; |
1217 } | |
1218 | |
1219 if (context != 0) | |
1220 write_string_1 (context, -1, stream); | |
1221 | |
1222 print_error_message (data, stream); | |
1223 | 1218 |
1224 /* If the window system or terminal frame hasn't been initialized | 1219 /* If the window system or terminal frame hasn't been initialized |
1225 yet, or we're in -batch mode, this error should cause Emacs to exit. */ | 1220 yet, or we're in -batch mode, this error should cause Emacs to exit. */ |
1226 if (kill_emacs_p) | 1221 if (kill_emacs_p) |
1227 { | 1222 { |