changeset 89700:90509a3fb47f

(face_before_or_after_it_pos): Call FACE_FOR_CHAR with POS and OBJECT args. (get_next_display_element): Likewise. (append_space): Likewise. (extend_face_to_end_of_line): Likewise. (get_char_face_and_encoding): Likewise. (BUILD_COMPOSITE_GLYPH_STRING): Likewise. (x_produce_glyphs): Likewise.
author Kenichi Handa <handa@m17n.org>
date Tue, 13 Jan 2004 01:40:47 +0000
parents cda6f41a592e
children a1d897828f2f
files src/xdisp.c
diffstat 1 files changed, 14 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/src/xdisp.c	Tue Jan 13 01:38:53 2004 +0000
+++ b/src/xdisp.c	Tue Jan 13 01:40:47 2004 +0000
@@ -2958,7 +2958,7 @@
 	  struct face *face = FACE_FROM_ID (it->f, face_id);
 
 	  c = string_char_and_length (p, rest, &len);
-	  face_id = FACE_FOR_CHAR (it->f, face, c);
+	  face_id = FACE_FOR_CHAR (it->f, face, c, CHARPOS (pos), it->string);
 	}
     }
   else
@@ -2997,7 +2997,7 @@
 	{
 	  int c = FETCH_MULTIBYTE_CHAR (BYTEPOS (pos));
 	  struct face *face = FACE_FROM_ID (it->f, face_id);
-	  face_id = FACE_FOR_CHAR (it->f, face, c);
+	  face_id = FACE_FOR_CHAR (it->f, face, c, CHARPOS (pos), Qnil);
 	}
     }
 
@@ -4925,7 +4925,10 @@
 	  && FRAME_WINDOW_P (it->f))
 	{
 	  struct face *face = FACE_FROM_ID (it->f, it->face_id);
-	  it->face_id = FACE_FOR_CHAR (it->f, face, it->c);
+	  int pos = (STRINGP (it->string)
+		     ? IT_STRING_CHARPOS (*it) : IT_CHARPOS (*it));
+
+	  it->face_id = FACE_FOR_CHAR (it->f, face, it->c, pos, it->string);
 	}
     }
 
@@ -14112,7 +14115,7 @@
 	  else if (it->face_before_selective_p)
 	    it->face_id = it->saved_face_id;
 	  face = FACE_FROM_ID (it->f, it->face_id);
-	  it->face_id = FACE_FOR_CHAR (it->f, face, 0);
+	  it->face_id = FACE_FOR_CHAR (it->f, face, 0, -1, Qnil);
 
 	  PRODUCE_GLYPHS (it);
 
@@ -14171,7 +14174,7 @@
          that the character will always be single byte in unibyte text.  */
   if (!ASCII_CHAR_P (it->c))
     {
-      it->face_id = FACE_FOR_CHAR (f, face, 0);
+      it->face_id = FACE_FOR_CHAR (f, face, 0, -1, Qnil);
     }
 
   if (FRAME_WINDOW_P (f))
@@ -17052,7 +17055,7 @@
       /* Unibyte case.  We don't have to encode, but we have to make
 	 sure to use a face suitable for unibyte.  */
       STORE_XCHAR2B (char2b, 0, c);
-      face_id = FACE_FOR_CHAR (f, face, c);
+      face_id = FACE_FOR_CHAR (f, face, c, -1, Qnil);
       face = FACE_FROM_ID (f, face_id);
     }
   else if (c < 128 && face_id < BASIC_FACE_ID_SENTINEL)
@@ -17274,7 +17277,7 @@
     for (n = 0; n < glyph_len; n++)					  \
       {									  \
 	int c = COMPOSITION_GLYPH (cmp, n);				  \
-	int this_face_id = FACE_FOR_CHAR (f, base_face, c);		  \
+	int this_face_id = FACE_FOR_CHAR (f, base_face, c, -1, Qnil);	  \
 	faces[n] = FACE_FROM_ID (f, this_face_id);			  \
 	get_char_face_and_encoding (f, c, this_face_id, 		  \
 				    char2b + n, 1, 1);			  \
@@ -17922,7 +17925,8 @@
 	  if (! SINGLE_BYTE_CHAR_P (it->c))
 	    {
 	      it->multibyte_p = 1;
-	      it->face_id = FACE_FOR_CHAR (it->f, face, it->char_to_display);
+	      it->face_id = FACE_FOR_CHAR (it->f, face, it->char_to_display,
+					   -1, Qnil);
 	      face = FACE_FROM_ID (it->f, it->face_id);
 	    }
 	}
@@ -18158,7 +18162,7 @@
 	}
 
       /* Get face and font to use.  Encode IT->char_to_display.  */
-      it->face_id = FACE_FOR_CHAR (it->f, face, it->char_to_display);
+      it->face_id = FACE_FOR_CHAR (it->f, face, it->char_to_display, -1, Qnil);
       face = FACE_FROM_ID (it->f, it->face_id);
       get_char_face_and_encoding (it->f, it->char_to_display, it->face_id,
 				  &char2b, it->multibyte_p, 0);
@@ -18246,7 +18250,7 @@
 	    {
 	      int left, right, btm, top;
 	      int ch = COMPOSITION_GLYPH (cmp, i);
-	      int face_id = FACE_FOR_CHAR (it->f, face, ch);
+	      int face_id = FACE_FOR_CHAR (it->f, face, ch, -1, Qnil);
 
 	      face = FACE_FROM_ID (it->f, face_id);
 	      get_char_face_and_encoding (it->f, ch, face->id,