diff options
| author | Jason Rumney | 2009-01-11 13:26:39 +0000 |
|---|---|---|
| committer | Jason Rumney | 2009-01-11 13:26:39 +0000 |
| commit | 0dad7c6f1189032751aa1811ba52aeb685a956bf (patch) | |
| tree | b77061222145969b9f8d666d60b7bc7ca3a1fc3a /src | |
| parent | 6fcec85ef350f03dc1150843c8b944a7f73a561e (diff) | |
| download | emacs-0dad7c6f1189032751aa1811ba52aeb685a956bf.tar.gz emacs-0dad7c6f1189032751aa1811ba52aeb685a956bf.zip | |
(cmd_error_internal): Exit when errors occur before
frame creation and not in daemon mode. (Bug#1836)
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/keyboard.c | 23 |
2 files changed, 16 insertions, 12 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 5b5375ae423..2e4e22508cc 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2009-01-11 Jason Rumney <jasonr@gnu.org> | ||
| 2 | |||
| 3 | * keyboard.c (cmd_error_internal): Exit when errors occur before | ||
| 4 | frame creation and not in daemon mode. (Bug#1836) | ||
| 5 | |||
| 1 | 2009-01-10 Chong Yidong <cyd@stupidchicken.com> | 6 | 2009-01-10 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 7 | ||
| 3 | * xdisp.c (pos_visible_p): When iterator stops on the last glyph | 8 | * xdisp.c (pos_visible_p): When iterator stops on the last glyph |
diff --git a/src/keyboard.c b/src/keyboard.c index 7fb035929dc..00c8a2af67a 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -1265,18 +1265,17 @@ cmd_error_internal (data, context) | |||
| 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, |