aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1994-08-07 04:51:57 +0000
committerRichard M. Stallman1994-08-07 04:51:57 +0000
commit2e16580f125edd2e7f63c8fc2a2489245eaf8c1c (patch)
tree28518f54312668fbac55edfa4e42a848792a51b8 /src
parentc46283849483d6d1a0e54fd38fc2739999f1853f (diff)
downloademacs-2e16580f125edd2e7f63c8fc2a2489245eaf8c1c.tar.gz
emacs-2e16580f125edd2e7f63c8fc2a2489245eaf8c1c.zip
(compute_glyph_face_1): New function.
Diffstat (limited to 'src')
-rw-r--r--src/xfaces.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/xfaces.c b/src/xfaces.c
index e147fb0c05b..4869076e07d 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -743,6 +743,31 @@ compute_glyph_face (f, face_code, current_face)
743 743
744 return intern_computed_face (f, &face); 744 return intern_computed_face (f, &face);
745} 745}
746
747/* Return the face ID to use to display a special glyph which selects
748 FACE_CODE as the face ID, assuming that ordinarily the face would
749 be CURRENT_FACE. F is the frame. */
750
751int
752compute_glyph_face_1 (f, face_name, current_face)
753 struct frame *f;
754 Lisp_Object face_name;
755 int current_face;
756{
757 struct face face;
758
759 face = *FRAME_COMPUTED_FACES (f)[current_face];
760
761 if (!NILP (face_name))
762 {
763 int facecode = face_name_id_number (f, face_name);
764 if (facecode >= 0 && facecode < FRAME_N_PARAM_FACES (f)
765 && FRAME_PARAM_FACES (f) [facecode] != 0)
766 merge_faces (FRAME_PARAM_FACES (f) [facecode], &face);
767 }
768
769 return intern_computed_face (f, &face);
770}
746 771
747/* Return the face ID associated with a buffer position POS. 772/* Return the face ID associated with a buffer position POS.
748 Store into *ENDPTR the position at which a different face is needed. 773 Store into *ENDPTR the position at which a different face is needed.