diff options
| author | Kenichi Handa | 2007-12-13 01:32:44 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2007-12-13 01:32:44 +0000 |
| commit | 518a2b30ffecf3cce30c206332184a5233800084 (patch) | |
| tree | 96dcedd5e6a1fb21bc3c2a7b0ee85eeaa529037b /src | |
| parent | d009d34c3ccef4b641e71f21c344518136df34f3 (diff) | |
| download | emacs-518a2b30ffecf3cce30c206332184a5233800084.tar.gz emacs-518a2b30ffecf3cce30c206332184a5233800084.zip | |
(handle_auto_composed_prop): Use Fget_text_property
instead of get_property_and_range.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xdisp.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index fbf7569583a..41c39a2f62b 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -4554,7 +4554,7 @@ handle_auto_composed_prop (it) | |||
| 4554 | if (FUNCTIONP (Vauto_composition_function)) | 4554 | if (FUNCTIONP (Vauto_composition_function)) |
| 4555 | { | 4555 | { |
| 4556 | Lisp_Object val = Qnil; | 4556 | Lisp_Object val = Qnil; |
| 4557 | EMACS_INT pos, pos_byte, this_pos, start, end; | 4557 | EMACS_INT pos, pos_byte; |
| 4558 | int c; | 4558 | int c; |
| 4559 | 4559 | ||
| 4560 | if (STRINGP (it->string)) | 4560 | if (STRINGP (it->string)) |
| @@ -4575,10 +4575,9 @@ handle_auto_composed_prop (it) | |||
| 4575 | pos_byte = IT_BYTEPOS (*it); | 4575 | pos_byte = IT_BYTEPOS (*it); |
| 4576 | c = FETCH_CHAR (pos_byte); | 4576 | c = FETCH_CHAR (pos_byte); |
| 4577 | } | 4577 | } |
| 4578 | this_pos = pos; | ||
| 4579 | 4578 | ||
| 4580 | if (get_property_and_range (pos, Qauto_composed, &val, &start, &end, | 4579 | val = Fget_text_property (make_number (pos), Qauto_composed, it->string); |
| 4581 | it->string)) | 4580 | if (! NILP (val)) |
| 4582 | { | 4581 | { |
| 4583 | Lisp_Object cmp_prop; | 4582 | Lisp_Object cmp_prop; |
| 4584 | EMACS_INT cmp_start, cmp_end; | 4583 | EMACS_INT cmp_start, cmp_end; |
| @@ -4603,6 +4602,7 @@ handle_auto_composed_prop (it) | |||
| 4603 | #endif | 4602 | #endif |
| 4604 | if (! NILP (val)) | 4603 | if (! NILP (val)) |
| 4605 | { | 4604 | { |
| 4605 | Lisp_Object end; | ||
| 4606 | EMACS_INT limit; | 4606 | EMACS_INT limit; |
| 4607 | 4607 | ||
| 4608 | /* As Fnext_single_char_property_change is very slow, we | 4608 | /* As Fnext_single_char_property_change is very slow, we |
| @@ -4611,22 +4611,26 @@ handle_auto_composed_prop (it) | |||
| 4611 | limit = SCHARS (it->string); | 4611 | limit = SCHARS (it->string); |
| 4612 | else | 4612 | else |
| 4613 | limit = find_next_newline_no_quit (pos, 1); | 4613 | limit = find_next_newline_no_quit (pos, 1); |
| 4614 | end = Fnext_single_char_property_change (make_number (pos), | ||
| 4615 | Qauto_composed, | ||
| 4616 | it->string, | ||
| 4617 | make_number (limit)); | ||
| 4614 | 4618 | ||
| 4615 | if (end < limit) | 4619 | if (XINT (end) < limit) |
| 4616 | { | 4620 | { |
| 4617 | /* The current point is auto-composed, but there | 4621 | /* The current point is auto-composed, but there |
| 4618 | exist characters not yet composed beyond the | 4622 | exist characters not yet composed beyond the |
| 4619 | auto-composed region. There's a possiblity that | 4623 | auto-composed region. There's a possiblity that |
| 4620 | the last characters in the region may be newly | 4624 | the last characters in the region may be newly |
| 4621 | composed. */ | 4625 | composed. */ |
| 4622 | if (pos < end - 1) | 4626 | if (pos < XINT (end) - 1) |
| 4623 | { | 4627 | { |
| 4624 | if (get_property_and_range (end - 1, Qcomposition, | 4628 | if (get_property_and_range (XINT (end) - 1, Qcomposition, |
| 4625 | &cmp_prop, &cmp_start, | 4629 | &cmp_prop, &cmp_start, |
| 4626 | &cmp_end, it->string)) | 4630 | &cmp_end, it->string)) |
| 4627 | pos = cmp_start; | 4631 | pos = cmp_start; |
| 4628 | else | 4632 | else |
| 4629 | pos = end - 1; | 4633 | pos = XINT (end) - 1; |
| 4630 | } | 4634 | } |
| 4631 | val = Qnil; | 4635 | val = Qnil; |
| 4632 | } | 4636 | } |