aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa2007-12-06 07:24:26 +0000
committerKenichi Handa2007-12-06 07:24:26 +0000
commit4c92356f0819ffe594cb16680a052a1a8a13f436 (patch)
tree7dfa2656d4a1a05b915ca17617b19cb00b97b64f /src
parentf192035123f874808a791718fca44d7100d5fcad (diff)
downloademacs-4c92356f0819ffe594cb16680a052a1a8a13f436.tar.gz
emacs-4c92356f0819ffe594cb16680a052a1a8a13f436.zip
(handle_auto_composed_prop): Fix previous change.
Diffstat (limited to 'src')
-rw-r--r--src/xdisp.c27
1 files changed, 11 insertions, 16 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index e120a8fa5a7..9c79684e438 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -4553,7 +4553,7 @@ handle_auto_composed_prop (it)
4553 4553
4554 if (FUNCTIONP (Vauto_composition_function)) 4554 if (FUNCTIONP (Vauto_composition_function))
4555 { 4555 {
4556 Lisp_Object val; 4556 Lisp_Object val = Qnil;
4557 EMACS_INT pos, pos_byte, this_pos, start, end; 4557 EMACS_INT pos, pos_byte, this_pos, start, end;
4558 int c; 4558 int c;
4559 4559
@@ -4596,7 +4596,8 @@ handle_auto_composed_prop (it)
4596 if (! EQ (font_object, 4596 if (! EQ (font_object,
4597 font_at (c, pos, FACE_FROM_ID (it->f, it->face_id), 4597 font_at (c, pos, FACE_FROM_ID (it->f, it->face_id),
4598 it->w, it->string))) 4598 it->w, it->string)))
4599 /* We must re-compute the composition. */ 4599 /* We must re-compute the composition for the
4600 different font. */
4600 val = Qnil; 4601 val = Qnil;
4601 } 4602 }
4602#endif 4603#endif
@@ -4618,22 +4619,16 @@ handle_auto_composed_prop (it)
4618 auto-composed region. There's a possiblity that 4619 auto-composed region. There's a possiblity that
4619 the last characters in the region may be newly 4620 the last characters in the region may be newly
4620 composed. */ 4621 composed. */
4621 int charpos = end - 1, bytepos, c; 4622 if (pos < end - 1)
4622
4623 if (STRINGP (it->string))
4624 {
4625 bytepos = string_char_to_byte (it->string, charpos);
4626 c = SDATA (it->string)[bytepos];
4627 }
4628 else
4629 { 4623 {
4630 bytepos = CHAR_TO_BYTE (charpos); 4624 if (get_property_and_range (end - 1, Qcomposition,
4631 c = FETCH_BYTE (bytepos); 4625 &cmp_prop, &cmp_start,
4626 &cmp_end, it->string))
4627 pos = cmp_start;
4628 else
4629 pos = end - 1;
4632 } 4630 }
4633 if (c != '\n') 4631 val = Qnil;
4634 /* If the last character is not newline, it may be
4635 composed with the following characters. */
4636 val = Qnil, pos = charpos + 1;
4637 } 4632 }
4638 } 4633 }
4639 } 4634 }