From: Richard M. Stallman Date: Sat, 13 Apr 2002 17:49:00 +0000 (+0000) Subject: (run_pre_post_conversion_on_str): X-Git-Tag: ttn-vms-21-2-B4~15637 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3fd9494be46a04a821c22759d80131ebc136c57c;p=emacs.git (run_pre_post_conversion_on_str): Don't call temp_output_buffer_setup--do just part, by hand. --- diff --git a/src/coding.c b/src/coding.c index dce943d3310..2a1fc1309f1 100644 --- a/src/coding.c +++ b/src/coding.c @@ -5797,17 +5797,30 @@ run_pre_post_conversion_on_str (str, coding, encodep) int count = specpdl_ptr - specpdl; struct gcpro gcpro1; int multibyte = STRING_MULTIBYTE (str); + Lisp_Object buffer; + struct buffer *buf; record_unwind_protect (Fset_buffer, Fcurrent_buffer ()); record_unwind_protect (code_convert_region_unwind, Qnil); GCPRO1 (str); - temp_output_buffer_setup (" *code-converting-work*"); - set_buffer_internal (XBUFFER (Vstandard_output)); + + buffer = Fget_buffer_create (build_string (" *code-converting-work*")); + buf = XBUFFER (buffer); + + buf->directory = current_buffer->directory; + buf->read_only = Qnil; + buf->filename = Qnil; + buf->undo_list = Qt; + buf->overlays_before = Qnil; + buf->overlays_after = Qnil; + + set_buffer_internal (buf); /* We must insert the contents of STR as is without unibyte<->multibyte conversion. For that, we adjust the multibyteness of the working buffer to that of STR. */ Ferase_buffer (); - current_buffer->enable_multibyte_characters = multibyte ? Qt : Qnil; + buf->enable_multibyte_characters = multibyte ? Qt : Qnil; + insert_from_string (str, 0, 0, XSTRING (str)->size, STRING_BYTES (XSTRING (str)), 0); UNGCPRO;