comparison src/coding.c @ 44562:11442d8a69cc

(run_pre_post_conversion_on_str): Don't call temp_output_buffer_setup--do just part, by hand.
author Richard M. Stallman <rms@gnu.org>
date Sat, 13 Apr 2002 17:49:00 +0000
parents 5ad6c4210a07
children 6ce63e0a93f1
comparison
equal deleted inserted replaced
44561:b79166cba466 44562:11442d8a69cc
5795 int encodep; 5795 int encodep;
5796 { 5796 {
5797 int count = specpdl_ptr - specpdl; 5797 int count = specpdl_ptr - specpdl;
5798 struct gcpro gcpro1; 5798 struct gcpro gcpro1;
5799 int multibyte = STRING_MULTIBYTE (str); 5799 int multibyte = STRING_MULTIBYTE (str);
5800 Lisp_Object buffer;
5801 struct buffer *buf;
5800 5802
5801 record_unwind_protect (Fset_buffer, Fcurrent_buffer ()); 5803 record_unwind_protect (Fset_buffer, Fcurrent_buffer ());
5802 record_unwind_protect (code_convert_region_unwind, Qnil); 5804 record_unwind_protect (code_convert_region_unwind, Qnil);
5803 GCPRO1 (str); 5805 GCPRO1 (str);
5804 temp_output_buffer_setup (" *code-converting-work*"); 5806
5805 set_buffer_internal (XBUFFER (Vstandard_output)); 5807 buffer = Fget_buffer_create (build_string (" *code-converting-work*"));
5808 buf = XBUFFER (buffer);
5809
5810 buf->directory = current_buffer->directory;
5811 buf->read_only = Qnil;
5812 buf->filename = Qnil;
5813 buf->undo_list = Qt;
5814 buf->overlays_before = Qnil;
5815 buf->overlays_after = Qnil;
5816
5817 set_buffer_internal (buf);
5806 /* We must insert the contents of STR as is without 5818 /* We must insert the contents of STR as is without
5807 unibyte<->multibyte conversion. For that, we adjust the 5819 unibyte<->multibyte conversion. For that, we adjust the
5808 multibyteness of the working buffer to that of STR. */ 5820 multibyteness of the working buffer to that of STR. */
5809 Ferase_buffer (); 5821 Ferase_buffer ();
5810 current_buffer->enable_multibyte_characters = multibyte ? Qt : Qnil; 5822 buf->enable_multibyte_characters = multibyte ? Qt : Qnil;
5823
5811 insert_from_string (str, 0, 0, 5824 insert_from_string (str, 0, 0,
5812 XSTRING (str)->size, STRING_BYTES (XSTRING (str)), 0); 5825 XSTRING (str)->size, STRING_BYTES (XSTRING (str)), 0);
5813 UNGCPRO; 5826 UNGCPRO;
5814 inhibit_pre_post_conversion = 1; 5827 inhibit_pre_post_conversion = 1;
5815 if (encodep) 5828 if (encodep)