emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs/src keyboard.c


From: Jason Rumney
Subject: [Emacs-diffs] emacs/src keyboard.c
Date: Sun, 11 Jan 2009 13:24:27 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Jason Rumney <jasonr>   09/01/11 13:24:27

Modified files:
        src            : keyboard.c 

Log message:
        (cmd_error_internal): Exit when errors occur before
        frame creation and not in daemon mode.  (Bug#1836)

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/src/keyboard.c?cvsroot=emacs&r1=1.988&r2=1.989

Patches:
Index: keyboard.c
===================================================================
RCS file: /sources/emacs/emacs/src/keyboard.c,v
retrieving revision 1.988
retrieving revision 1.989
diff -u -b -r1.988 -r1.989
--- keyboard.c  9 Jan 2009 03:30:10 -0000       1.988
+++ keyboard.c  11 Jan 2009 13:24:26 -0000      1.989
@@ -1265,18 +1265,17 @@
   /* 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
-          /* 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.  */
+          /* The initial frame is a special non-displaying frame. It
+             will be current in daemon mode when there are no frames
+             to display, and in non-daemon mode before the real frame
+             has finished initializing.  If an error is thrown in the
+             latter case while creating the frame, then the frame
+             will never be displayed, so the safest thing to do is
+             write to stderr and quit.  In daemon mode, there are
+             many other potential errors that do not prevent frames
+             from being created, so continuing as normal is better in
+             that case.  */
+          || (!IS_DAEMON && FRAME_INITIAL_P (sf))
           || noninteractive)
     {
       print_error_message (data, Qexternal_debugging_output,




reply via email to

[Prev in Thread] Current Thread [Next in Thread]