]> code.delx.au - gnu-emacs/commitdiff
(cmd_error_internal): Don't exit in daemon mode, bug#1310.
authorStefan Monnier <monnier@iro.umontreal.ca>
Sun, 21 Dec 2008 04:13:46 +0000 (04:13 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Sun, 21 Dec 2008 04:13:46 +0000 (04:13 +0000)
src/ChangeLog
src/keyboard.c

index bd37f3528fde104a3d989f4ac2bc8d5d1e6e26a8..ae758b60dcf1ebe84d314fe4c7aabeb62ed59737 100644 (file)
@@ -1,3 +1,7 @@
+2008-12-21  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * keyboard.c (cmd_error_internal): Don't exit in daemon mode, bug#1310.
+
 2008-12-20  Jason Rumney  <jasonr@gnu.org>
 
        * frame.c (Fmake_terminal_frame): Raise an error when called from
index 1d2f4eb7a9af92f4c1fb19f568554a88c3162708..6f6b094e88c2f09b1055d6074ec1ecd73fdc9a11 100644 (file)
@@ -1265,7 +1265,18 @@ cmd_error_internal (data, context)
   /* If the window system or terminal frame hasn't been initialized
      yet, or we're not interactive, write the message to stderr and exit.  */
   else if (!sf->glyphs_initialized_p
-          || FRAME_INITIAL_P (sf)
+          /* We used to check if "This is the case of the frame dumped with
+              Emacs, when we're running under a window system" with
+               || (!NILP (Vwindow_system) && !inhibit_window_system
+                   && FRAME_TERMCAP_P (sf))
+             then the multi-tty code generalized this check to
+               || FRAME_INITIAL_P (sf)
+             but this leads to undesirable behavior in daemon mode where
+             we don't want to exit just because we got an error without
+             having a frame (bug#1310).
+             So I just removed the check, and rely instead on the `message_*'
+             functions properly using FRAME_INITIAL_P.  In the worst case
+             this should just make Emacs not exit when it should.  */
           || noninteractive)
     {
       print_error_message (data, Qexternal_debugging_output,