2897 |
int multibytep; |
int multibytep; |
2898 |
{ |
{ |
2899 |
unsigned char c1, c2; |
unsigned char c1, c2; |
2900 |
/* Dummy for TWO_MORE_BYTES. */ |
/* Dummy for ONE_MORE_BYTE_CHECK_MULTIBYTE. */ |
2901 |
struct coding_system dummy_coding; |
struct coding_system dummy_coding; |
2902 |
struct coding_system *coding = &dummy_coding; |
struct coding_system *coding = &dummy_coding; |
2903 |
|
|
5200 |
} while (0) |
} while (0) |
5201 |
|
|
5202 |
static Lisp_Object |
static Lisp_Object |
5203 |
code_convert_region_unwind (dummy) |
code_convert_region_unwind (arg) |
5204 |
Lisp_Object dummy; |
Lisp_Object arg; |
5205 |
{ |
{ |
5206 |
inhibit_pre_post_conversion = 0; |
inhibit_pre_post_conversion = 0; |
5207 |
|
Vlast_coding_system_used = arg; |
5208 |
return Qnil; |
return Qnil; |
5209 |
} |
} |
5210 |
|
|
5448 |
struct buffer *prev = current_buffer; |
struct buffer *prev = current_buffer; |
5449 |
Lisp_Object new; |
Lisp_Object new; |
5450 |
|
|
5451 |
record_unwind_protect (code_convert_region_unwind, Qnil); |
record_unwind_protect (code_convert_region_unwind, |
5452 |
|
Vlatin_extra_code_table); |
5453 |
/* We should not call any more pre-write/post-read-conversion |
/* We should not call any more pre-write/post-read-conversion |
5454 |
functions while this pre-write-conversion is running. */ |
functions while this pre-write-conversion is running. */ |
5455 |
inhibit_pre_post_conversion = 1; |
inhibit_pre_post_conversion = 1; |
5807 |
&& ! encodep && ! NILP (coding->post_read_conversion)) |
&& ! encodep && ! NILP (coding->post_read_conversion)) |
5808 |
{ |
{ |
5809 |
Lisp_Object val; |
Lisp_Object val; |
5810 |
|
Lisp_Object saved_coding_system; |
5811 |
|
|
5812 |
if (from != PT) |
if (from != PT) |
5813 |
TEMP_SET_PT_BOTH (from, from_byte); |
TEMP_SET_PT_BOTH (from, from_byte); |
5814 |
prev_Z = Z; |
prev_Z = Z; |
5815 |
record_unwind_protect (code_convert_region_unwind, Qnil); |
record_unwind_protect (code_convert_region_unwind, |
5816 |
|
Vlast_coding_system_used); |
5817 |
|
saved_coding_system = Vlast_coding_system_used; |
5818 |
|
Vlast_coding_system_used = coding->symbol; |
5819 |
/* We should not call any more pre-write/post-read-conversion |
/* We should not call any more pre-write/post-read-conversion |
5820 |
functions while this post-read-conversion is running. */ |
functions while this post-read-conversion is running. */ |
5821 |
inhibit_pre_post_conversion = 1; |
inhibit_pre_post_conversion = 1; |
5822 |
val = call1 (coding->post_read_conversion, make_number (inserted)); |
val = call1 (coding->post_read_conversion, make_number (inserted)); |
5823 |
inhibit_pre_post_conversion = 0; |
inhibit_pre_post_conversion = 0; |
5824 |
|
coding->symbol = Vlast_coding_system_used; |
5825 |
|
Vlast_coding_system_used = saved_coding_system; |
5826 |
/* Discard the unwind protect. */ |
/* Discard the unwind protect. */ |
5827 |
specpdl_ptr--; |
specpdl_ptr--; |
5828 |
CHECK_NUMBER (val); |
CHECK_NUMBER (val); |
5868 |
Lisp_Object old_deactivate_mark; |
Lisp_Object old_deactivate_mark; |
5869 |
|
|
5870 |
record_unwind_protect (Fset_buffer, Fcurrent_buffer ()); |
record_unwind_protect (Fset_buffer, Fcurrent_buffer ()); |
5871 |
record_unwind_protect (code_convert_region_unwind, Qnil); |
record_unwind_protect (code_convert_region_unwind, |
5872 |
|
Vlast_coding_system_used); |
5873 |
/* It is not crucial to specbind this. */ |
/* It is not crucial to specbind this. */ |
5874 |
old_deactivate_mark = Vdeactivate_mark; |
old_deactivate_mark = Vdeactivate_mark; |
5875 |
GCPRO2 (str, old_deactivate_mark); |
GCPRO2 (str, old_deactivate_mark); |
5899 |
call2 (coding->pre_write_conversion, make_number (BEG), make_number (Z)); |
call2 (coding->pre_write_conversion, make_number (BEG), make_number (Z)); |
5900 |
else |
else |
5901 |
{ |
{ |
5902 |
|
Vlast_coding_system_used = coding->symbol; |
5903 |
TEMP_SET_PT_BOTH (BEG, BEG_BYTE); |
TEMP_SET_PT_BOTH (BEG, BEG_BYTE); |
5904 |
call1 (coding->post_read_conversion, make_number (Z - BEG)); |
call1 (coding->post_read_conversion, make_number (Z - BEG)); |
5905 |
|
coding->symbol = Vlast_coding_system_used; |
5906 |
} |
} |
5907 |
inhibit_pre_post_conversion = 0; |
inhibit_pre_post_conversion = 0; |
5908 |
Vdeactivate_mark = old_deactivate_mark; |
Vdeactivate_mark = old_deactivate_mark; |