diff options
| author | Kenichi Handa | 2007-12-25 10:33:11 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2007-12-25 10:33:11 +0000 |
| commit | c1f156b73be210f7dae123d0cacc48fd11d9ccec (patch) | |
| tree | ad583106219f2d719bac6e157cf206ca06043424 /src | |
| parent | 4cec60619a84d85499ea425390b0d79d341d7627 (diff) | |
| download | emacs-c1f156b73be210f7dae123d0cacc48fd11d9ccec.tar.gz emacs-c1f156b73be210f7dae123d0cacc48fd11d9ccec.zip | |
(handle_auto_composed_prop): Change the argument to
auto-composition-function.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xdisp.c | 34 |
1 files changed, 20 insertions, 14 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index 973f8f705cd..5f0ff5e08f9 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; | 4557 | EMACS_INT pos, limit = -1; |
| 4558 | 4558 | ||
| 4559 | if (STRINGP (it->string)) | 4559 | if (STRINGP (it->string)) |
| 4560 | pos = IT_STRING_CHARPOS (*it); | 4560 | pos = IT_STRING_CHARPOS (*it); |
| @@ -4588,7 +4588,6 @@ handle_auto_composed_prop (it) | |||
| 4588 | if (! NILP (val)) | 4588 | if (! NILP (val)) |
| 4589 | { | 4589 | { |
| 4590 | Lisp_Object end; | 4590 | Lisp_Object end; |
| 4591 | EMACS_INT limit; | ||
| 4592 | 4591 | ||
| 4593 | /* As Fnext_single_char_property_change is very slow, we | 4592 | /* As Fnext_single_char_property_change is very slow, we |
| 4594 | limit the search to the current line. */ | 4593 | limit the search to the current line. */ |
| @@ -4612,21 +4611,28 @@ handle_auto_composed_prop (it) | |||
| 4612 | } | 4611 | } |
| 4613 | if (NILP (val)) | 4612 | if (NILP (val)) |
| 4614 | { | 4613 | { |
| 4615 | int count = SPECPDL_INDEX (); | 4614 | if (limit < 0) |
| 4616 | Lisp_Object args[4]; | 4615 | limit = (STRINGP (it->string) ? SCHARS (it->string) |
| 4616 | : find_next_newline_no_quit (pos, 1)); | ||
| 4617 | if (pos < limit) | ||
| 4618 | { | ||
| 4619 | int count = SPECPDL_INDEX (); | ||
| 4620 | Lisp_Object args[5]; | ||
| 4617 | 4621 | ||
| 4618 | args[0] = Vauto_composition_function; | 4622 | args[0] = Vauto_composition_function; |
| 4619 | specbind (Qauto_composition_function, Qnil); | 4623 | specbind (Qauto_composition_function, Qnil); |
| 4620 | args[1] = make_number (pos); | 4624 | args[1] = make_number (pos); |
| 4621 | args[2] = it->string; | 4625 | args[2] = make_number (limit); |
| 4622 | #ifdef USE_FONT_BACKEND | 4626 | #ifdef USE_FONT_BACKEND |
| 4623 | if (enable_font_backend) | 4627 | if (enable_font_backend) |
| 4624 | args[3] = it->window; | 4628 | args[3] = it->window; |
| 4625 | else | 4629 | else |
| 4626 | #endif /* USE_FONT_BACKEND */ | 4630 | #endif /* USE_FONT_BACKEND */ |
| 4627 | args[3] = Qnil; | 4631 | args[3] = Qnil; |
| 4628 | safe_call (4, args); | 4632 | args[4] = it->string; |
| 4629 | unbind_to (count, Qnil); | 4633 | safe_call (5, args); |
| 4634 | unbind_to (count, Qnil); | ||
| 4635 | } | ||
| 4630 | } | 4636 | } |
| 4631 | } | 4637 | } |
| 4632 | 4638 | ||