changeset 23542:eaf358b2e8dd

(code_convert_region): Kill the work buffer created by pre-write-conversion.
author Kenichi Handa <handa@m17n.org>
date Mon, 26 Oct 1998 08:00:11 +0000
parents 417a469a4354
children 6f3b920860e5
files src/coding.c
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/coding.c	Mon Oct 26 05:00:27 1998 +0000
+++ b/src/coding.c	Mon Oct 26 08:00:11 1998 +0000
@@ -4264,18 +4264,20 @@
     {
       /* 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)