aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/fileio.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/fileio.c b/src/fileio.c
index 674b954e401..24a3377f8e8 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -289,6 +289,18 @@ restore_point_unwind (location)
289 Fset_marker (location, Qnil, Qnil); 289 Fset_marker (location, Qnil, Qnil);
290 return Qnil; 290 return Qnil;
291} 291}
292
293/* Kill the working buffer for code conversion. */
294
295static Lisp_Object
296kill_workbuf_unwind (workbuf)
297 Lisp_Object workbuf;
298{
299 if (! NILP (workbuf) && ! NILP (Fbuffer_live_p (workbuf)))
300 Fkill_buffer (workbuf);
301 return Qnil;
302}
303
292 304
293Lisp_Object Qexpand_file_name; 305Lisp_Object Qexpand_file_name;
294Lisp_Object Qsubstitute_in_file_name; 306Lisp_Object Qsubstitute_in_file_name;
@@ -4032,12 +4044,12 @@ actually used. */)
4032 unsigned char *decoded; 4044 unsigned char *decoded;
4033 int temp; 4045 int temp;
4034 int this_count = BINDING_STACK_SIZE (); 4046 int this_count = BINDING_STACK_SIZE ();
4047 int multibyte = ! NILP (current_buffer->enable_multibyte_characters);
4035 Lisp_Object conversion_buffer 4048 Lisp_Object conversion_buffer
4036 = make_conversion_work_buffer (! NILP (current_buffer 4049 = make_conversion_work_buffer (-1, multibyte);
4037 ->enable_multibyte_characters));
4038 struct gcpro1; 4050 struct gcpro1;
4039 4051
4040 record_unwind_protect (code_conversion_restore, save_excursion_save ()); 4052 record_unwind_protect (kill_workbuf_unwind, conversion_buffer);
4041 4053
4042 /* First read the whole file, performing code conversion into 4054 /* First read the whole file, performing code conversion into
4043 CONVERSION_BUFFER. */ 4055 CONVERSION_BUFFER. */