(signal_before_change): If inhibit_modification_hooks
[bpt/emacs.git] / src / insdel.c
index 60cfefd..a7807dd 100644 (file)
@@ -1656,10 +1656,6 @@ adjust_after_replace (from, from_byte, prev_text, len, len_byte)
   if (BUF_INTERVALS (current_buffer) != 0)
     {
       offset_intervals (current_buffer, from, len - nchars_del);
-      if (len - nchars_del > 0)
-       Fset_text_properties (make_number (from),
-                             make_number (from + len - nchars_del),
-                             Qnil, Qnil);
     }
 #endif
 
@@ -2324,6 +2320,9 @@ signal_before_change (start_int, end_int, preserve_ptr)
   Lisp_Object preserve_marker;
   struct gcpro gcpro1, gcpro2, gcpro3;
 
+  if (inhibit_modification_hooks)
+    return;
+
   start = make_number (start_int);
   end = make_number (end_int);
   preserve_marker = Qnil;
@@ -2410,6 +2409,9 @@ void
 signal_after_change (charpos, lendel, lenins)
      int charpos, lendel, lenins;
 {
+  if (inhibit_modification_hooks)
+    return;
+
   /* If we are deferring calls to the after-change functions
      and there are no before-change functions,
      just record the args that we were going to use.  */