aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman2005-06-17 14:03:08 +0000
committerRichard M. Stallman2005-06-17 14:03:08 +0000
commit5f81871efe4ff488329685bbf65ab81db9c92768 (patch)
tree95b60cf013db0f4332605540397feebb38840596 /src
parentc68b9c2ffe50e1245136b6ce15d55a197ed8e708 (diff)
downloademacs-5f81871efe4ff488329685bbf65ab81db9c92768.tar.gz
emacs-5f81871efe4ff488329685bbf65ab81db9c92768.zip
(spec_glyph_lookup_face): New function.
(build_frame_matrix_from_leaf_window): Use it.
Diffstat (limited to 'src')
-rw-r--r--src/dispnew.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/dispnew.c b/src/dispnew.c
index 6d851ba8471..727547d089d 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -2722,6 +2722,7 @@ build_frame_matrix_from_leaf_window (frame_matrix, w)
2722 right_border_glyph = (dp && INTEGERP (DISP_BORDER_GLYPH (dp)) 2722 right_border_glyph = (dp && INTEGERP (DISP_BORDER_GLYPH (dp))
2723 ? XINT (DISP_BORDER_GLYPH (dp)) 2723 ? XINT (DISP_BORDER_GLYPH (dp))
2724 : '|'); 2724 : '|');
2725 right_border_glyph = spec_glyph_lookup_face (w, right_border_glyph);
2725 } 2726 }
2726 } 2727 }
2727 else 2728 else
@@ -2802,6 +2803,27 @@ build_frame_matrix_from_leaf_window (frame_matrix, w)
2802 } 2803 }
2803} 2804}
2804 2805
2806/* Given a user-specified glyph, possibly including a Lisp-level face
2807 ID, return a glyph that has a realized face ID.
2808 This is used for glyphs displayed specially and not part of the text;
2809 for instance, vertical separators, truncation markers, etc. */
2810
2811GLYPH
2812spec_glyph_lookup_face (w, glyph)
2813 struct window *w;
2814 GLYPH glyph;
2815{
2816 int lface_id = FAST_GLYPH_FACE (glyph);
2817 /* Convert the glyph's specified face to a realized (cache) face. */
2818 if (lface_id > 0)
2819 {
2820 int face_id = merge_faces (XFRAME (w->frame),
2821 Qt, lface_id, DEFAULT_FACE_ID);
2822 glyph
2823 = FAST_MAKE_GLYPH (FAST_GLYPH_CHAR (glyph), face_id);
2824 }
2825 return glyph;
2826}
2805 2827
2806/* Add spaces to a glyph row ROW in a window matrix. 2828/* Add spaces to a glyph row ROW in a window matrix.
2807 2829