diff options
author | Gerd Moellmann <gerd@gnu.org> | 2001-08-27 13:50:42 +0000 |
---|---|---|
committer | Gerd Moellmann <gerd@gnu.org> | 2001-08-27 13:50:42 +0000 |
commit | 1ddb09f51c247494d4b434fc603e5adda8b9aa7d (patch) | |
tree | 623d333ed8645803f0ac6d1f0855bcf4952d533e /src/fileio.c | |
parent | d3b98912ef807203ed444d394b4c34181c0fb635 (diff) | |
download | emacs-1ddb09f51c247494d4b434fc603e5adda8b9aa7d.tar.gz |
Finsert_file_contents): Allocate, restore, and
free composition data in the case of REPLACE not being nil.
Diffstat (limited to 'src/fileio.c')
-rw-r--r-- | src/fileio.c | 6 |
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.") /* Convert this batch with results in CONVERSION_BUFFER. */ if (how_much >= total) /* This is the last block. */ coding.mode |= CODING_MODE_LAST_BLOCK; + if (coding.composing != COMPOSITION_DISABLED) + coding_allocate_composition_data (&coding, BEGV); result = decode_coding (&coding, read_buf, conversion_buffer + inserted, this, bufsize - inserted); @@ -4124,6 +4126,10 @@ actually used.") SET_PT_BOTH (temp, same_at_start); insert_1 (conversion_buffer + same_at_start - BEG_BYTE, inserted, 0, 0, 0); + if (coding.cmp_data && coding.cmp_data->used) + coding_restore_composition (&coding, Fcurrent_buffer ()); + coding_free_composition_data (&coding); + /* Set `inserted' to the number of inserted characters. */ inserted = PT - temp; |