From: Gerd Moellmann Date: Sun, 20 Feb 2000 21:54:26 +0000 (+0000) Subject: (Finsert_file_contents): Unbind the binding of X-Git-Tag: emacs-pretest-21.0.90~4946 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1d92afcdb4f94e02948d6914923221aa025dd00b;p=emacs.git (Finsert_file_contents): Unbind the binding of standard-output done by temp_output_buffer_setup. --- diff --git a/src/ChangeLog b/src/ChangeLog index e7ba55229b8..01a86c89df1 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,4 +1,7 @@ -2000-02-19 Gerd Moellmann +2000-02-20 Gerd Moellmann + + * fileio.c (Finsert_file_contents): Unbind the binding of + standard-output done by temp_output_buffer_setup. * eval.c (funcall_lambda): Don't bind Qmocklisp_arguments unless Vmocklisp_arguments is nil. Inline Fcar and Fcdr. diff --git a/src/fileio.c b/src/fileio.c index d693369ddfe..1d3da63ba5c 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -3543,9 +3543,15 @@ actually used.") else if (nread > 0) { struct buffer *prev = current_buffer; + int count1; record_unwind_protect (Fset_buffer, Fcurrent_buffer ()); + + /* The call to temp_output_buffer_setup binds + standard-output. */ + count1 = specpdl_ptr - specpdl; temp_output_buffer_setup (" *code-converting-work*"); + set_buffer_internal (XBUFFER (Vstandard_output)); current_buffer->enable_multibyte_characters = Qnil; insert_1_both (read_buf, nread, nread, 0, 0, 0); @@ -3553,6 +3559,10 @@ actually used.") val = call2 (Vset_auto_coding_function, filename, make_number (nread)); set_buffer_internal (prev); + + /* Remove the binding for standard-output. */ + unbind_to (count1, Qnil); + /* Discard the unwind protect for recovering the current buffer. */ specpdl_ptr--;