aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa1998-03-16 05:51:07 +0000
committerKenichi Handa1998-03-16 05:51:07 +0000
commitf4ac86afc5b2297b76649cc2aad4df678ded8e3d (patch)
tree849b64846bbf753e2090ee567dc9cdaff03f0157 /src
parent01364a75fb1378ada7c267e2aa78ebd1a786c1cb (diff)
downloademacs-f4ac86afc5b2297b76649cc2aad4df678ded8e3d.tar.gz
emacs-f4ac86afc5b2297b76649cc2aad4df678ded8e3d.zip
(Finsert_file_contents): Comment modified. Give
adjust_after_replace the new arg REPLACE as 0.
Diffstat (limited to 'src')
-rw-r--r--src/fileio.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/fileio.c b/src/fileio.c
index 7def34b7dcb..59d587ae1d4 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -3771,6 +3771,9 @@ This does code conversion according to the value of\n\
3771 { 3771 {
3772 if (CODING_MAY_REQUIRE_DECODING (&coding)) 3772 if (CODING_MAY_REQUIRE_DECODING (&coding))
3773 { 3773 {
3774 /* Here, we don't have to consider byte combining (see the
3775 comment below) because code_convert_region takes care of
3776 it. */
3774 code_convert_region (PT, PT_BYTE, PT + inserted, PT_BYTE + inserted, 3777 code_convert_region (PT, PT_BYTE, PT + inserted, PT_BYTE + inserted,
3775 &coding, 0, 0); 3778 &coding, 0, 0);
3776 inserted = (NILP (current_buffer->enable_multibyte_characters) 3779 inserted = (NILP (current_buffer->enable_multibyte_characters)
@@ -3780,8 +3783,11 @@ This does code conversion according to the value of\n\
3780 { 3783 {
3781 int inserted_byte = inserted; 3784 int inserted_byte = inserted;
3782 3785
3783 /* At first, reset positions to the state of before 3786 /* There's a possibility that we must combine bytes at the
3784 insertion. */ 3787 head (resp. the tail) of the just inserted text with the
3788 bytes before (resp. after) the gap to form a single
3789 character. Thus, we, at first, rewind the adjusted
3790 character positions (GPT, ZV, Z), then adjust them again. */
3785 GAP_SIZE += inserted; 3791 GAP_SIZE += inserted;
3786 GPT_BYTE -= inserted; 3792 GPT_BYTE -= inserted;
3787 ZV_BYTE -= inserted; 3793 ZV_BYTE -= inserted;
@@ -3790,10 +3796,9 @@ This does code conversion according to the value of\n\
3790 ZV -= inserted; 3796 ZV -= inserted;
3791 Z -= inserted; 3797 Z -= inserted;
3792 3798
3793 /* Then adjust positions. */
3794 inserted = multibyte_chars_in_text (GPT_ADDR, inserted); 3799 inserted = multibyte_chars_in_text (GPT_ADDR, inserted);
3795 adjust_after_replace (PT, PT_BYTE, PT, PT_BYTE, 3800 adjust_after_replace (PT, PT_BYTE, PT, PT_BYTE,
3796 inserted, inserted_byte); 3801 inserted, inserted_byte, 0);
3797 } 3802 }
3798 3803
3799#ifdef DOS_NT 3804#ifdef DOS_NT