aboutsummaryrefslogtreecommitdiffstats
path: root/src/xdisp.c
diff options
context:
space:
mode:
authorKenichi Handa <[email protected]>2007-12-14 11:15:43 +0000
committerKenichi Handa <[email protected]>2007-12-14 11:15:43 +0000
commitce021083cdd62fd15e44b38a28dac560679c070c (patch)
tree334719faf5b04b54e9eb816fa769af693f8fe6c5 /src/xdisp.c
parentf8e341abb3ee2595b7c69c4c5a15f3f4404fdee1 (diff)
(handle_auto_composed_prop): Don't get a character at
the position here, and call font_at with the arg C -1. Don't check the range of the existing composition at the point.
Diffstat (limited to 'src/xdisp.c')
-rw-r--r--src/xdisp.c46
1 files changed, 10 insertions, 36 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index 41c39a2f62..973f8f705c 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -4554,27 +4554,12 @@ handle_auto_composed_prop (it)
if (FUNCTIONP (Vauto_composition_function))
{
Lisp_Object val = Qnil;
- EMACS_INT pos, pos_byte;
- int c;
+ EMACS_INT pos;
if (STRINGP (it->string))
- {
- const unsigned char *s;
-
- pos = IT_STRING_CHARPOS (*it);
- pos_byte = IT_STRING_BYTEPOS (*it);
- s = SDATA (it->string) + pos_byte;
- if (STRING_MULTIBYTE (it->string))
- c = STRING_CHAR (s, 0);
- else
- c = *s;
- }
+ pos = IT_STRING_CHARPOS (*it);
else
- {
- pos = IT_CHARPOS (*it);
- pos_byte = IT_BYTEPOS (*it);
- c = FETCH_CHAR (pos_byte);
- }
+ pos = IT_CHARPOS (*it);
val = Fget_text_property (make_number (pos), Qauto_composed, it->string);
if (! NILP (val))
@@ -4593,7 +4578,7 @@ handle_auto_composed_prop (it)
Lisp_Object font_object = LGSTRING_FONT (gstring);
if (! EQ (font_object,
- font_at (c, pos, FACE_FROM_ID (it->f, it->face_id),
+ font_at (-1, pos, FACE_FROM_ID (it->f, it->face_id),
it->w, it->string)))
/* We must re-compute the composition for the
different font. */
@@ -4617,23 +4602,12 @@ handle_auto_composed_prop (it)
make_number (limit));
if (XINT (end) < limit)
- {
- /* The current point is auto-composed, but there
- exist characters not yet composed beyond the
- auto-composed region. There's a possiblity that
- the last characters in the region may be newly
- composed. */
- if (pos < XINT (end) - 1)
- {
- if (get_property_and_range (XINT (end) - 1, Qcomposition,
- &cmp_prop, &cmp_start,
- &cmp_end, it->string))
- pos = cmp_start;
- else
- pos = XINT (end) - 1;
- }
- val = Qnil;
- }
+ /* The current point is auto-composed, but there exist
+ characters not yet composed beyond the
+ auto-composed region. There's a possiblity that
+ the last characters in the region may be newly
+ composed. */
+ val = Qnil;
}
}
if (NILP (val))