diff options
| author | Kenichi Handa <handa@m17n.org> | 1998-10-24 01:17:09 +0000 |
|---|---|---|
| committer | Kenichi Handa <handa@m17n.org> | 1998-10-24 01:17:09 +0000 |
| commit | 6abb9bd9675dcb89e4f8a0903e7e41eb1eb3e0ec (patch) | |
| tree | 8c428141b268e1bd6bdff0aaa60a5cbfb59544f1 /src/coding.c | |
| parent | 9b703a38c632537810ab1cbe1ff93befa17849c7 (diff) | |
| download | emacs-6abb9bd9675dcb89e4f8a0903e7e41eb1eb3e0ec.tar.gz | |
(code_convert_region): While preserving the orignal
point, pay attention to the byte combining problem.
Diffstat (limited to 'src/coding.c')
| -rw-r--r-- | src/coding.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/coding.c b/src/coding.c index cb6da188de5..6d78aa0d7b9 100644 --- a/src/coding.c +++ b/src/coding.c @@ -4170,6 +4170,7 @@ code_convert_region (from, from_byte, to, to_byte, coding, encodep, replace) unsigned char *src, *dst; Lisp_Object deletion; int orig_point = PT, orig_len = len; + int prev_Z; deletion = Qnil; saved_coding_symbol = Qnil; @@ -4523,7 +4524,9 @@ code_convert_region (from, from_byte, to, to_byte, coding, encodep, replace) to += tail_skip; to_byte += tail_skip; } + prev_Z = Z; adjust_after_replace (from, from_byte, deletion, inserted, inserted_byte); + inserted = Z - prev_Z; if (! encodep && ! NILP (coding->post_read_conversion)) { @@ -4531,12 +4534,10 @@ code_convert_region (from, from_byte, to, to_byte, coding, encodep, replace) if (from != PT) TEMP_SET_PT_BOTH (from, from_byte); + prev_Z = Z; val = call1 (coding->post_read_conversion, make_number (inserted)); - if (! NILP (val)) - { - CHECK_NUMBER (val, 0); - inserted = XFASTINT (val); - } + CHECK_NUMBER (val, 0); + inserted = Z - prev_Z; } if (orig_point >= from) |
