From: Kenichi Handa Date: Mon, 26 Oct 1998 08:00:11 +0000 (+0000) Subject: (code_convert_region): Kill the work buffer created by X-Git-Tag: emacs-20.4~1407 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0007bdd098d4397ac1ad9e272617fb8e93a1ad40;p=emacs.git (code_convert_region): Kill the work buffer created by pre-write-conversion. --- diff --git a/src/coding.c b/src/coding.c index 6d78aa0d7b9..5ae0d5f4dc4 100644 --- a/src/coding.c +++ b/src/coding.c @@ -4264,18 +4264,20 @@ code_convert_region (from, from_byte, to, to_byte, coding, encodep, replace) { /* The function in pre-write-conversion may put a new text in a new buffer. */ - struct buffer *prev = current_buffer, *new; + struct buffer *prev = current_buffer; + Lisp_Object new; call2 (coding->pre_write_conversion, make_number (from), make_number (to)); if (current_buffer != prev) { len = ZV - BEGV; - new = current_buffer; + new = Fcurrent_buffer (); set_buffer_internal_1 (prev); del_range_2 (from, from_byte, to, to_byte); TEMP_SET_PT_BOTH (from, from_byte); - insert_from_buffer (new, 1, len, 0); + insert_from_buffer (XBUFFER (new), 1, len, 0); + Fkill_buffer (new); if (orig_point >= to) orig_point += len - orig_len; else if (orig_point > from)