From: Kenichi Handa Date: Fri, 15 Jan 2010 05:09:50 +0000 (+0900) Subject: xdisp.c (CHAR_COMPOSED_P): New arg END_CHARPOS. Callers changed. X-Git-Tag: emacs-pretest-23.1.92~38^2~1 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=cc320f07d4d1c0033c1728d22421462ab1fcc04e;p=emacs.git xdisp.c (CHAR_COMPOSED_P): New arg END_CHARPOS. Callers changed. --- diff --git a/src/ChangeLog b/src/ChangeLog index e18591b345b..91db3a3dbae 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2010-01-15 Kenichi Handa + + * xdisp.c (CHAR_COMPOSED_P): New arg END_CHARPOS. Callers changed. + 2010-01-14 Kenichi Handa * coding.c (detect_coding_iso_2022): Fix handling of euc-xx coding diff --git a/src/xdisp.c b/src/xdisp.c index b20061b6b3b..ef9c7453d75 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -5638,11 +5638,11 @@ static int (* get_next_element[NUM_IT_METHODS]) P_ ((struct it *it)) = /* Return 1 iff a character at CHARPOS (and BYTEPOS) is composed (possibly with the following characters). */ -#define CHAR_COMPOSED_P(IT,CHARPOS,BYTEPOS) \ +#define CHAR_COMPOSED_P(IT,CHARPOS,BYTEPOS,END_CHARPOS) \ ((IT)->cmp_it.id >= 0 \ || ((IT)->cmp_it.stop_pos == (CHARPOS) \ && composition_reseat_it (&(IT)->cmp_it, CHARPOS, BYTEPOS, \ - (IT)->end_charpos, (IT)->w, \ + END_CHARPOS, (IT)->w, \ FACE_FROM_ID ((IT)->f, (IT)->face_id), \ (IT)->string))) @@ -6300,7 +6300,7 @@ next_element_from_string (it) return 0; } else if (CHAR_COMPOSED_P (it, IT_STRING_CHARPOS (*it), - IT_STRING_BYTEPOS (*it)) + IT_STRING_BYTEPOS (*it), SCHARS (it->string)) && next_element_from_composition (it)) { return 1; @@ -6336,7 +6336,7 @@ next_element_from_string (it) CHARPOS (position) = BYTEPOS (position) = -1; } else if (CHAR_COMPOSED_P (it, IT_STRING_CHARPOS (*it), - IT_STRING_BYTEPOS (*it)) + IT_STRING_BYTEPOS (*it), it->string_nchars) && next_element_from_composition (it)) { return 1; @@ -6523,7 +6523,8 @@ next_element_from_buffer (it) && IT_CHARPOS (*it) >= it->redisplay_end_trigger_charpos) run_redisplay_end_trigger_hook (it); - if (CHAR_COMPOSED_P (it, IT_CHARPOS (*it), IT_BYTEPOS (*it)) + if (CHAR_COMPOSED_P (it, IT_CHARPOS (*it), IT_BYTEPOS (*it), + it->end_charpos) && next_element_from_composition (it)) { return 1;