]> git.eshelyaron.com Git - emacs.git/commitdiff
Initialize the default frame faces in batch mode under pdumper
authorDaniel Colascione <dancol@dancol.org>
Mon, 26 Feb 2018 05:32:50 +0000 (21:32 -0800)
committerDaniel Colascione <dancol@dancol.org>
Mon, 26 Feb 2018 05:32:50 +0000 (21:32 -0800)
src/dispnew.c
src/emacs.c

index 1b75db9fc6f1b606fcae0745dda523f4a08fc0b4..492318053401cebd3a0ff9371351aa8b2e7137dd 100644 (file)
@@ -5977,12 +5977,24 @@ pass nil for VARIABLE.  */)
                            Initialization
 ***********************************************************************/
 
+static void
+init_faces_initial (void)
+{
+  /* For the initial frame, we don't have any way of knowing what
+     are the foreground and background colors of the terminal.  */
+  struct frame *sf = SELECTED_FRAME ();
+
+  FRAME_FOREGROUND_PIXEL (sf) = FACE_TTY_DEFAULT_FG_COLOR;
+  FRAME_BACKGROUND_PIXEL (sf) = FACE_TTY_DEFAULT_BG_COLOR;
+  call0 (intern ("tty-set-up-initial-frame-faces"));
+}
+
 /* Initialization done when Emacs fork is started, before doing stty.
    Determine terminal type and set terminal_driver.  Then invoke its
    decoding routine to set up variables in the terminal package.  */
 
-void
-init_display (void)
+static void
+init_display_interactive (void)
 {
   char *terminal_type;
 
@@ -6156,18 +6168,21 @@ init_display (void)
 
   /* Set up faces of the initial terminal frame.  */
   if (!noninteractive && NILP (Vinitial_window_system))
-    {
-      /* For the initial frame, we don't have any way of knowing what
-        are the foreground and background colors of the terminal.  */
-      struct frame *sf = SELECTED_FRAME ();
+    init_faces_initial ();
+}
 
-      FRAME_FOREGROUND_PIXEL (sf) = FACE_TTY_DEFAULT_FG_COLOR;
-      FRAME_BACKGROUND_PIXEL (sf) = FACE_TTY_DEFAULT_BG_COLOR;
-      call0 (intern ("tty-set-up-initial-frame-faces"));
+void
+init_display (void)
+{
+  if (noninteractive)
+    {
+      if (dumped_with_pdumper_p ())
+        init_faces_initial ();
     }
+  else
+    init_display_interactive ();
 }
 
-
 \f
 /***********************************************************************
                           Blinking cursor
index b8ebe9ef2206bbb1e01ff6250bfa76fde6ae1930..8f4ecd1b07af8f071911f63f0c2eb15430fec0f4 100644 (file)
@@ -1858,8 +1858,7 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem
   init_process_emacs (sockfd);
 
   init_keyboard ();    /* This too must precede init_sys_modes.  */
-  if (!noninteractive)
-    init_display ();   /* Determine terminal type.  Calls init_sys_modes.  */
+  init_display ();     /* Determine terminal type.  Calls init_sys_modes.  */
 #if HAVE_W32NOTIFY
   else
     init_crit ();      /* w32notify.c needs this in batch mode.  */