changeset 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 a83ca83c8626
children 789be3d7ef2d
files src/coding.c
diffstat 1 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/coding.c	Thu Oct 08 06:45:36 1998 +0000
+++ b/src/coding.c	Thu Oct 08 06:48:42 1998 +0000
@@ -4299,9 +4299,15 @@
   }
 
   /* The code conversion routine can not preserve text properties for
-     now.  So, we must remove all text properties in the region.  */
+     now.  So, we must remove all text properties in the region.
+     Here, we must suppress all modification hooks.  */
   if (replace)
-    Fset_text_properties (make_number (from), make_number (to), Qnil, Qnil);
+    {
+      int saved_inhibit_modification_hooks = inhibit_modification_hooks;
+      inhibit_modification_hooks = 1;
+      Fset_text_properties (make_number (from), make_number (to), Qnil, Qnil);
+      inhibit_modification_hooks = saved_inhibit_modification_hooks;
+    }
 
   /* For converion, we must put the gap before the text in addition to
      making the gap larger for efficient decoding.  The required gap