Mercurial > emacs
changeset 38973:64125d607a06
Finsert_file_contents): Allocate, restore, and
free composition data in the case of REPLACE not being nil.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Mon, 27 Aug 2001 13:50:42 +0000 |
parents | 4459c45545d0 |
children | 9ea80db8a1de |
files | src/fileio.c |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/fileio.c Mon Aug 27 13:03:53 2001 +0000 +++ b/src/fileio.c Mon Aug 27 13:50:42 2001 +0000 @@ -4016,6 +4016,8 @@ /* 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 @@ 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;