Mercurial > emacs
comparison src/coding.c @ 47632:551472d77d2a
(run_pre_post_conversion_on_str): Save and restore Vdeactivate_mark.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Thu, 26 Sep 2002 22:03:41 +0000 |
parents | ff3c709c7ef1 |
children | 77511decc5ff |
comparison
equal
deleted
inserted
replaced
47631:433ae412d00f | 47632:551472d77d2a |
---|---|
5813 Lisp_Object str; | 5813 Lisp_Object str; |
5814 struct coding_system *coding; | 5814 struct coding_system *coding; |
5815 int encodep; | 5815 int encodep; |
5816 { | 5816 { |
5817 int count = SPECPDL_INDEX (); | 5817 int count = SPECPDL_INDEX (); |
5818 struct gcpro gcpro1; | 5818 struct gcpro gcpro1, gcpro2; |
5819 int multibyte = STRING_MULTIBYTE (str); | 5819 int multibyte = STRING_MULTIBYTE (str); |
5820 Lisp_Object buffer; | 5820 Lisp_Object buffer; |
5821 struct buffer *buf; | 5821 struct buffer *buf; |
5822 Lisp_Object old_deactivate_mark; | |
5822 | 5823 |
5823 record_unwind_protect (Fset_buffer, Fcurrent_buffer ()); | 5824 record_unwind_protect (Fset_buffer, Fcurrent_buffer ()); |
5824 record_unwind_protect (code_convert_region_unwind, Qnil); | 5825 record_unwind_protect (code_convert_region_unwind, Qnil); |
5825 GCPRO1 (str); | 5826 /* It is not crucial to specbind this. */ |
5827 old_deactivate_mark = Vdeactivate_mark; | |
5828 GCPRO2 (str, old_deactivate_mark); | |
5826 | 5829 |
5827 buffer = Fget_buffer_create (build_string (" *code-converting-work*")); | 5830 buffer = Fget_buffer_create (build_string (" *code-converting-work*")); |
5828 buf = XBUFFER (buffer); | 5831 buf = XBUFFER (buffer); |
5829 | 5832 |
5830 buf->directory = current_buffer->directory; | 5833 buf->directory = current_buffer->directory; |
5851 { | 5854 { |
5852 TEMP_SET_PT_BOTH (BEG, BEG_BYTE); | 5855 TEMP_SET_PT_BOTH (BEG, BEG_BYTE); |
5853 call1 (coding->post_read_conversion, make_number (Z - BEG)); | 5856 call1 (coding->post_read_conversion, make_number (Z - BEG)); |
5854 } | 5857 } |
5855 inhibit_pre_post_conversion = 0; | 5858 inhibit_pre_post_conversion = 0; |
5859 Vdeactivate_mark = old_deactivate_mark; | |
5856 str = make_buffer_string (BEG, Z, 1); | 5860 str = make_buffer_string (BEG, Z, 1); |
5857 return unbind_to (count, str); | 5861 return unbind_to (count, str); |
5858 } | 5862 } |
5859 | 5863 |
5860 Lisp_Object | 5864 Lisp_Object |