emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master ef49439: Move default face lookup


From: Robert Pluim
Subject: [Emacs-diffs] master ef49439: Move default face lookup
Date: Fri, 23 Aug 2019 04:08:40 -0400 (EDT)

branch: master
commit ef49439ff9b5b09e9f77425c13713f55b7b6316a
Author: Robert Pluim <address@hidden>
Commit: Robert Pluim <address@hidden>

    Move default face lookup
    
    * src/xdisp.c (extend_face_to_end_of_line): Move default face
    lookup lower.
---
 src/xdisp.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/src/xdisp.c b/src/xdisp.c
index dea80a1..41d36bd 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -20463,7 +20463,7 @@ append_space_for_newline (struct it *it, bool 
default_face_p)
 static void
 extend_face_to_end_of_line (struct it *it)
 {
-  struct face *face, *default_face;
+  struct face *face;
   struct frame *f = it->f;
 
   /* If line is already filled, do nothing.  Non window-system frames
@@ -20481,10 +20481,6 @@ extend_face_to_end_of_line (struct it *it)
           || WINDOW_RIGHT_MARGIN_WIDTH (it->w) > 0))
     return;
 
-  /* The default face, possibly remapped. */
-  default_face =
-    FACE_FROM_ID_OR_NULL (f, lookup_basic_face (it->w, f, DEFAULT_FACE_ID));
-
   /* Face extension extends the background and box of IT->face_id
      to the end of the line.  If the background equals the background
      of the frame, we don't have to do anything.  */
@@ -20518,6 +20514,12 @@ extend_face_to_end_of_line (struct it *it)
     }
 
 #ifdef HAVE_WINDOW_SYSTEM
+  /* The default face, possibly remapped. */
+  struct face *default_face =
+    FACE_FROM_ID (f, lookup_basic_face (it->w, f, DEFAULT_FACE_ID));
+  if (default_face == NULL)
+    error ("extend_face_to_end_of_line: default_face is not set!");
+
   if (FRAME_WINDOW_P (f))
     {
       /* If the row is empty, add a space with the current face of IT,



reply via email to

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