comparison src/keyboard.c @ 101121:7981035d8c66

(cmd_error_internal): Exit when errors occur before frame creation and not in daemon mode. (Bug#1836)
author Jason Rumney <jasonr@gnu.org>
date Sun, 11 Jan 2009 13:24:26 +0000
parents ee5456efd63c
children 3ffd03438eeb
comparison
equal deleted inserted replaced
101120:c7a080d2d889 101121:7981035d8c66
1263 context ? build_string (context) : empty_unibyte_string, 1263 context ? build_string (context) : empty_unibyte_string,
1264 Vsignaling_function); 1264 Vsignaling_function);
1265 /* If the window system or terminal frame hasn't been initialized 1265 /* If the window system or terminal frame hasn't been initialized
1266 yet, or we're not interactive, write the message to stderr and exit. */ 1266 yet, or we're not interactive, write the message to stderr and exit. */
1267 else if (!sf->glyphs_initialized_p 1267 else if (!sf->glyphs_initialized_p
1268 /* We used to check if "This is the case of the frame dumped with 1268 /* The initial frame is a special non-displaying frame. It
1269 Emacs, when we're running under a window system" with 1269 will be current in daemon mode when there are no frames
1270 || (!NILP (Vwindow_system) && !inhibit_window_system 1270 to display, and in non-daemon mode before the real frame
1271 && FRAME_TERMCAP_P (sf)) 1271 has finished initializing. If an error is thrown in the
1272 then the multi-tty code generalized this check to 1272 latter case while creating the frame, then the frame
1273 || FRAME_INITIAL_P (sf) 1273 will never be displayed, so the safest thing to do is
1274 but this leads to undesirable behavior in daemon mode where 1274 write to stderr and quit. In daemon mode, there are
1275 we don't want to exit just because we got an error without 1275 many other potential errors that do not prevent frames
1276 having a frame (bug#1310). 1276 from being created, so continuing as normal is better in
1277 So I just removed the check, and rely instead on the `message_*' 1277 that case. */
1278 functions properly using FRAME_INITIAL_P. In the worst case 1278 || (!IS_DAEMON && FRAME_INITIAL_P (sf))
1279 this should just make Emacs not exit when it should. */
1280 || noninteractive) 1279 || noninteractive)
1281 { 1280 {
1282 print_error_message (data, Qexternal_debugging_output, 1281 print_error_message (data, Qexternal_debugging_output,
1283 context, Vsignaling_function); 1282 context, Vsignaling_function);
1284 Fterpri (Qexternal_debugging_output); 1283 Fterpri (Qexternal_debugging_output);