comparison src/coding.c @ 23402:6905813a49c6

(code_convert_region): Set inhibit_modification_hooks to 1 before calling Fset_text_properties.
author Kenichi Handa <handa@m17n.org>
date Thu, 08 Oct 1998 06:48:42 +0000
parents 2da87b489590
children 088cb2a804c7
comparison
equal deleted inserted replaced
23401:a83ca83c8626 23402:6905813a49c6
4297 to -= tail_skip; 4297 to -= tail_skip;
4298 len -= total_skip; len_byte -= total_skip; 4298 len -= total_skip; len_byte -= total_skip;
4299 } 4299 }
4300 4300
4301 /* The code conversion routine can not preserve text properties for 4301 /* The code conversion routine can not preserve text properties for
4302 now. So, we must remove all text properties in the region. */ 4302 now. So, we must remove all text properties in the region.
4303 Here, we must suppress all modification hooks. */
4303 if (replace) 4304 if (replace)
4304 Fset_text_properties (make_number (from), make_number (to), Qnil, Qnil); 4305 {
4306 int saved_inhibit_modification_hooks = inhibit_modification_hooks;
4307 inhibit_modification_hooks = 1;
4308 Fset_text_properties (make_number (from), make_number (to), Qnil, Qnil);
4309 inhibit_modification_hooks = saved_inhibit_modification_hooks;
4310 }
4305 4311
4306 /* For converion, we must put the gap before the text in addition to 4312 /* For converion, we must put the gap before the text in addition to
4307 making the gap larger for efficient decoding. The required gap 4313 making the gap larger for efficient decoding. The required gap
4308 size starts from 2000 which is the magic number used in make_gap. 4314 size starts from 2000 which is the magic number used in make_gap.
4309 But, after one batch of conversion, it will be incremented if we 4315 But, after one batch of conversion, it will be incremented if we