emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] pdumper 8f0ca98 1/2: Initialize the default frame faces in


From: Daniel Colascione
Subject: [Emacs-diffs] pdumper 8f0ca98 1/2: Initialize the default frame faces in batch mode under pdumper
Date: Mon, 26 Feb 2018 01:16:01 -0500 (EST)

branch: pdumper
commit 8f0ca9854ece68b42a8e0773e1948372a60d1f28
Author: Daniel Colascione <address@hidden>
Commit: Daniel Colascione <address@hidden>

    Initialize the default frame faces in batch mode under pdumper
---
 src/dispnew.c | 35 +++++++++++++++++++++++++----------
 src/emacs.c   |  3 +--
 2 files changed, 26 insertions(+), 12 deletions(-)

diff --git a/src/dispnew.c b/src/dispnew.c
index 1b75db9..4923180 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -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 ();
 }
 
-
 
 /***********************************************************************
                           Blinking cursor
diff --git a/src/emacs.c b/src/emacs.c
index b8ebe9e..8f4ecd1 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -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.  */



reply via email to

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