From: Kenichi Handa Date: Wed, 16 Sep 1998 07:21:31 +0000 (+0000) Subject: (code_convert_region): Update beg_unchanged and X-Git-Tag: emacs-20.4~1691 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f2558efdddf27108eedfd9f24f9ffb5414599c43;p=emacs.git (code_convert_region): Update beg_unchanged and end_unchanged after we delete the source text. --- diff --git a/src/coding.c b/src/coding.c index 80c0292e233..bc6035eb25b 100644 --- a/src/coding.c +++ b/src/coding.c @@ -4212,11 +4212,6 @@ code_convert_region (from, from_byte, to, to_byte, coding, encodep, replace) make_gap (require - GAP_SIZE); move_gap_both (from, from_byte); - if (GPT - BEG < beg_unchanged) - beg_unchanged = GPT - BEG; - if (Z - GPT < end_unchanged) - end_unchanged = Z - GPT; - inserted = inserted_byte = 0; src = GAP_END_ADDR, dst = GPT_ADDR; @@ -4226,6 +4221,11 @@ code_convert_region (from, from_byte, to, to_byte, coding, encodep, replace) ZV_BYTE -= len_byte; Z_BYTE -= len_byte; + if (GPT - BEG < beg_unchanged) + beg_unchanged = GPT - BEG; + if (Z - GPT < end_unchanged) + end_unchanged = Z - GPT; + for (;;) { int result;