emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/src/dispnew.c,v


From: Kim F. Storm
Subject: [Emacs-diffs] Changes to emacs/src/dispnew.c,v
Date: Wed, 27 Feb 2008 22:48:52 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Kim F. Storm <kfstorm>  08/02/27 22:48:52

Index: dispnew.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/dispnew.c,v
retrieving revision 1.401
retrieving revision 1.402
diff -u -b -r1.401 -r1.402
--- dispnew.c   1 Feb 2008 16:00:57 -0000       1.401
+++ dispnew.c   27 Feb 2008 22:48:52 -0000      1.402
@@ -1468,9 +1468,11 @@
       len = 0;
       while (beg < end)
        {
-         GLYPH g = GLYPH_FROM_CHAR_GLYPH (*beg);
+         GLYPH g;
 
-         if (g < 0
+         SET_GLYPH_FROM_CHAR_GLYPH (g, *beg);
+
+         if (GLYPH_INVALID_P (g) < 0
              || GLYPH_SIMPLE_P (glyph_table_base, glyph_table_len, g))
            len += 1;
          else
@@ -2740,7 +2742,9 @@
   struct glyph_matrix *window_matrix;
   int window_y, frame_y;
   /* If non-zero, a glyph to insert at the right border of W.  */
-  GLYPH right_border_glyph = 0;
+  GLYPH right_border_glyph;
+
+  SET_GLYPH_FROM_CHAR (right_border_glyph, 0);
 
   /* Set window_matrix to the matrix we have to add to FRAME_MATRIX.  */
   if (w->must_be_updated_p)
@@ -2751,15 +2755,19 @@
       if (!WINDOW_RIGHTMOST_P (w))
        {
          struct Lisp_Char_Table *dp = window_display_table (w);
+         Lisp_Object gc;
+
+         SET_GLYPH_FROM_CHAR (right_border_glyph, '|');
+         if (dp
+             && (gc = DISP_BORDER_GLYPH (dp), GLYPH_CODE_P (gc))
+             && GLYPH_CODE_CHAR_VALID_P (gc))
+           {
+             SET_GLYPH_FROM_GLYPH_CODE (right_border_glyph, gc);
+             spec_glyph_lookup_face (w, &right_border_glyph);
+           }
 
-         right_border_glyph
-           = ((dp && INTEGERP (DISP_BORDER_GLYPH (dp)))
-              ? spec_glyph_lookup_face (w, XINT (DISP_BORDER_GLYPH (dp)))
-              : '|');
-
-         if (FAST_GLYPH_FACE (right_border_glyph) <= 0)
-           right_border_glyph
-             = FAST_MAKE_GLYPH (right_border_glyph, VERTICAL_BORDER_FACE_ID);
+         if (GLYPH_FACE (right_border_glyph) <= 0)
+           SET_GLYPH_FACE (right_border_glyph, VERTICAL_BORDER_FACE_ID);
        }
     }
   else
@@ -2809,7 +2817,7 @@
 
           /* Maybe insert a vertical border between horizontally adjacent
             windows.  */
-          if (right_border_glyph)
+          if (GLYPH_CHAR (right_border_glyph) != 0)
            {
               struct glyph *border = window_row->glyphs[LAST_AREA] - 1;
              SET_CHAR_GLYPH_FROM_GLYPH (*border, right_border_glyph);
@@ -2845,21 +2853,19 @@
    This is used for glyphs displayed specially and not part of the text;
    for instance, vertical separators, truncation markers, etc.  */
 
-GLYPH
+void
 spec_glyph_lookup_face (w, glyph)
      struct window *w;
-     GLYPH glyph;
+     GLYPH *glyph;
 {
-  int lface_id = FAST_GLYPH_FACE (glyph);
+  int lface_id = GLYPH_FACE (*glyph);
   /* Convert the glyph's specified face to a realized (cache) face.  */
   if (lface_id > 0)
     {
       int face_id = merge_faces (XFRAME (w->frame),
                                 Qt, lface_id, DEFAULT_FACE_ID);
-      glyph
-       = FAST_MAKE_GLYPH (FAST_GLYPH_CHAR (glyph), face_id);
+      SET_GLYPH_FACE (*glyph, face_id);
     }
-  return glyph;
 }
 
 /* Add spaces to a glyph row ROW in a window matrix.
@@ -6792,7 +6798,7 @@
 
   /* Construct the space glyph.  */
   space_glyph.type = CHAR_GLYPH;
-  SET_CHAR_GLYPH_FROM_GLYPH (space_glyph, ' ');
+  SET_CHAR_GLYPH (space_glyph, ' ', DEFAULT_FACE_ID, 0);
   space_glyph.charpos = -1;
 
   inverse_video = 0;




reply via email to

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