Mercurial > emacs
comparison src/coding.c @ 21308:6d8fff47f6a0
(code_convert_region): Call adjust_before_replace
in the no-conversion case. Adjust GPT, ZV and Z in chars.
| author | Richard M. Stallman <rms@gnu.org> |
|---|---|
| date | Sat, 28 Mar 1998 21:55:22 +0000 |
| parents | 3d9e12cf2e63 |
| children | 27b08da98abe |
comparison
equal
deleted
inserted
replaced
| 21307:9ac5045a93ce | 21308:6d8fff47f6a0 |
|---|---|
| 4007 : ! CODING_REQUIRE_DECODING (coding)) | 4007 : ! CODING_REQUIRE_DECODING (coding)) |
| 4008 { | 4008 { |
| 4009 coding->produced = len_byte; | 4009 coding->produced = len_byte; |
| 4010 if (multibyte) | 4010 if (multibyte) |
| 4011 { | 4011 { |
| 4012 adjust_before_replace (from, from_byte, to, to_byte); | |
| 4013 | |
| 4012 /* We still may have to combine byte at the head and the | 4014 /* We still may have to combine byte at the head and the |
| 4013 tail of the text in the region. */ | 4015 tail of the text in the region. */ |
| 4014 if (GPT != to) | 4016 if (GPT != to) |
| 4015 move_gap_both (to, to_byte); | 4017 move_gap_both (to, to_byte); |
| 4016 coding->produced_char | 4018 coding->produced_char |
| 4017 = multibyte_chars_in_text (BYTE_POS_ADDR (from_byte), len_byte); | 4019 = multibyte_chars_in_text (BYTE_POS_ADDR (from_byte), len_byte); |
| 4018 GAP_SIZE += len_byte; | 4020 GAP_SIZE += len_byte; |
| 4019 GPT_BYTE -= len_byte; | 4021 GPT_BYTE -= len_byte; |
| 4020 ZV_BYTE -= len_byte; | 4022 ZV_BYTE -= len_byte; |
| 4021 Z_BYTE -= len_byte; | 4023 Z_BYTE -= len_byte; |
| 4022 GPT -= len_byte; | 4024 GPT -= len; |
| 4023 ZV -= len_byte; | 4025 ZV -= len; |
| 4024 Z -= len_byte; | 4026 Z -= len; |
| 4025 adjust_after_replace (from, from_byte, to, to_byte, | 4027 adjust_after_replace (from, from_byte, to, to_byte, |
| 4026 coding->produced_char, len_byte, replace); | 4028 coding->produced_char, len_byte, replace); |
| 4027 } | 4029 } |
| 4028 else | 4030 else |
| 4029 coding->produced_char = len_byte; | 4031 coding->produced_char = len_byte; |
