diff options
| author | Kenichi Handa | 2007-06-14 12:33:56 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2007-06-14 12:33:56 +0000 |
| commit | 553d31640139f393e80dd411fe2b07509d47bd5b (patch) | |
| tree | e3a86094a94c1d4de3cf21bd2b9edd4eb833cb21 /src | |
| parent | 6dadd99f86f4c4ec30e8cfc7de286b15aaa31304 (diff) | |
| download | emacs-553d31640139f393e80dd411fe2b07509d47bd5b.tar.gz emacs-553d31640139f393e80dd411fe2b07509d47bd5b.zip | |
(update_compositions): Check the validness of
compositions.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/composite.c | 13 |
2 files changed, 14 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index fd8c3235166..4342561ae54 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2007-06-14 Kenichi Handa <handa@etlken.m17n.org> | ||
| 2 | |||
| 3 | * composite.c (update_compositions): Check the validness of | ||
| 4 | compositions. | ||
| 5 | |||
| 1 | 2007-06-14 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | 6 | 2007-06-14 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> |
| 2 | 7 | ||
| 3 | * frame.h (struct frame) [MAC_OS]: New member external_tool_bar. | 8 | * frame.h (struct frame) [MAC_OS]: New member external_tool_bar. |
diff --git a/src/composite.c b/src/composite.c index 3e0606e9007..4e6c08a65cc 100644 --- a/src/composite.c +++ b/src/composite.c | |||
| @@ -500,7 +500,8 @@ update_compositions (from, to, check_mask) | |||
| 500 | avoid it, in such a case, we change the property of the | 500 | avoid it, in such a case, we change the property of the |
| 501 | latter to the copy of it. */ | 501 | latter to the copy of it. */ |
| 502 | if (from > BEGV | 502 | if (from > BEGV |
| 503 | && find_composition (from - 1, -1, &start, &end, &prop, Qnil)) | 503 | && find_composition (from - 1, -1, &start, &end, &prop, Qnil) |
| 504 | && COMPOSITION_VALID_P (start, end, prop)) | ||
| 504 | { | 505 | { |
| 505 | if (from < end) | 506 | if (from < end) |
| 506 | Fput_text_property (make_number (from), make_number (end), | 507 | Fput_text_property (make_number (from), make_number (end), |
| @@ -510,7 +511,8 @@ update_compositions (from, to, check_mask) | |||
| 510 | from = end; | 511 | from = end; |
| 511 | } | 512 | } |
| 512 | else if (from < ZV | 513 | else if (from < ZV |
| 513 | && find_composition (from, -1, &start, &from, &prop, Qnil)) | 514 | && find_composition (from, -1, &start, &from, &prop, Qnil) |
| 515 | && COMPOSITION_VALID_P (start, end, prop)) | ||
| 514 | run_composition_function (start, from, prop); | 516 | run_composition_function (start, from, prop); |
| 515 | } | 517 | } |
| 516 | 518 | ||
| @@ -521,6 +523,7 @@ update_compositions (from, to, check_mask) | |||
| 521 | (to - 1). */ | 523 | (to - 1). */ |
| 522 | while (from < to - 1 | 524 | while (from < to - 1 |
| 523 | && find_composition (from, to, &start, &from, &prop, Qnil) | 525 | && find_composition (from, to, &start, &from, &prop, Qnil) |
| 526 | && COMPOSITION_VALID_P (start, end, prop) | ||
| 524 | && from < to - 1) | 527 | && from < to - 1) |
| 525 | run_composition_function (start, from, prop); | 528 | run_composition_function (start, from, prop); |
| 526 | } | 529 | } |
| @@ -528,7 +531,8 @@ update_compositions (from, to, check_mask) | |||
| 528 | if (check_mask & CHECK_TAIL) | 531 | if (check_mask & CHECK_TAIL) |
| 529 | { | 532 | { |
| 530 | if (from < to | 533 | if (from < to |
| 531 | && find_composition (to - 1, -1, &start, &end, &prop, Qnil)) | 534 | && find_composition (to - 1, -1, &start, &end, &prop, Qnil) |
| 535 | && COMPOSITION_VALID_P (start, end, prop)) | ||
| 532 | { | 536 | { |
| 533 | /* TO should be also at composition boundary. But, | 537 | /* TO should be also at composition boundary. But, |
| 534 | insertion or deletion will make two compositions adjacent | 538 | insertion or deletion will make two compositions adjacent |
| @@ -542,7 +546,8 @@ update_compositions (from, to, check_mask) | |||
| 542 | run_composition_function (start, end, prop); | 546 | run_composition_function (start, end, prop); |
| 543 | } | 547 | } |
| 544 | else if (to < ZV | 548 | else if (to < ZV |
| 545 | && find_composition (to, -1, &start, &end, &prop, Qnil)) | 549 | && find_composition (to, -1, &start, &end, &prop, Qnil) |
| 550 | && COMPOSITION_VALID_P (start, end, prop)) | ||
| 546 | run_composition_function (start, end, prop); | 551 | run_composition_function (start, end, prop); |
| 547 | } | 552 | } |
| 548 | } | 553 | } |