aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGerd Moellmann2001-08-27 13:50:42 +0000
committerGerd Moellmann2001-08-27 13:50:42 +0000
commit1ddb09f51c247494d4b434fc603e5adda8b9aa7d (patch)
tree623d333ed8645803f0ac6d1f0855bcf4952d533e /src
parentd3b98912ef807203ed444d394b4c34181c0fb635 (diff)
downloademacs-1ddb09f51c247494d4b434fc603e5adda8b9aa7d.tar.gz
emacs-1ddb09f51c247494d4b434fc603e5adda8b9aa7d.zip
Finsert_file_contents): Allocate, restore, and
free composition data in the case of REPLACE not being nil.
Diffstat (limited to 'src')
-rw-r--r--src/fileio.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/fileio.c b/src/fileio.c
index 39850dcc45c..f5aeaee7a03 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -4016,6 +4016,8 @@ actually used.")
4016 /* Convert this batch with results in CONVERSION_BUFFER. */ 4016 /* Convert this batch with results in CONVERSION_BUFFER. */
4017 if (how_much >= total) /* This is the last block. */ 4017 if (how_much >= total) /* This is the last block. */
4018 coding.mode |= CODING_MODE_LAST_BLOCK; 4018 coding.mode |= CODING_MODE_LAST_BLOCK;
4019 if (coding.composing != COMPOSITION_DISABLED)
4020 coding_allocate_composition_data (&coding, BEGV);
4019 result = decode_coding (&coding, read_buf, 4021 result = decode_coding (&coding, read_buf,
4020 conversion_buffer + inserted, 4022 conversion_buffer + inserted,
4021 this, bufsize - inserted); 4023 this, bufsize - inserted);
@@ -4124,6 +4126,10 @@ actually used.")
4124 SET_PT_BOTH (temp, same_at_start); 4126 SET_PT_BOTH (temp, same_at_start);
4125 insert_1 (conversion_buffer + same_at_start - BEG_BYTE, inserted, 4127 insert_1 (conversion_buffer + same_at_start - BEG_BYTE, inserted,
4126 0, 0, 0); 4128 0, 0, 0);
4129 if (coding.cmp_data && coding.cmp_data->used)
4130 coding_restore_composition (&coding, Fcurrent_buffer ());
4131 coding_free_composition_data (&coding);
4132
4127 /* Set `inserted' to the number of inserted characters. */ 4133 /* Set `inserted' to the number of inserted characters. */
4128 inserted = PT - temp; 4134 inserted = PT - temp;
4129 4135