]> git.eshelyaron.com Git - emacs.git/commitdiff
(verify_interval_modification): Fix last change.
authorGerd Moellmann <gerd@gnu.org>
Tue, 11 Sep 2001 12:45:24 +0000 (12:45 +0000)
committerGerd Moellmann <gerd@gnu.org>
Tue, 11 Sep 2001 12:45:24 +0000 (12:45 +0000)
src/textprop.c

index 0bb2d42cdca8fb2ffb8c7c70b9ed4c0b1a390bd8..5bbd7ffd92ae5322ae0951723709706008afd0fc 100644 (file)
@@ -1902,7 +1902,7 @@ verify_interval_modification (buf, start, end)
        interval_insert_in_front_hooks
          = textget (i->plist, Qinsert_in_front_hooks);
     }
-  else if (!inhibit_modification_hooks)
+  else
     {
       /* Loop over intervals on or next to START...END,
         collecting their hooks.  */
@@ -1913,11 +1913,14 @@ verify_interval_modification (buf, start, end)
          if (! INTERVAL_WRITABLE_P (i))
            text_read_only ();
 
-         mod_hooks = textget (i->plist, Qmodification_hooks);
-         if (! NILP (mod_hooks) && ! EQ (mod_hooks, prev_mod_hooks))
+         if (!inhibit_modification_hooks)
            {
-             hooks = Fcons (mod_hooks, hooks);
-             prev_mod_hooks = mod_hooks;
+             mod_hooks = textget (i->plist, Qmodification_hooks);
+             if (! NILP (mod_hooks) && ! EQ (mod_hooks, prev_mod_hooks))
+               {
+                 hooks = Fcons (mod_hooks, hooks);
+                 prev_mod_hooks = mod_hooks;
+               }
            }
 
          i = next_interval (i);
@@ -1925,15 +1928,18 @@ verify_interval_modification (buf, start, end)
       /* Keep going thru the interval containing the char before END.  */
       while (! NULL_INTERVAL_P (i) && i->position < end);
 
-      GCPRO1 (hooks);
-      hooks = Fnreverse (hooks);
-      while (! EQ (hooks, Qnil))
+      if (!inhibit_modification_hooks)
        {
-         call_mod_hooks (Fcar (hooks), make_number (start),
-                         make_number (end));
-         hooks = Fcdr (hooks);
+         GCPRO1 (hooks);
+         hooks = Fnreverse (hooks);
+         while (! EQ (hooks, Qnil))
+           {
+             call_mod_hooks (Fcar (hooks), make_number (start),
+                             make_number (end));
+             hooks = Fcdr (hooks);
+           }
+         UNGCPRO;
        }
-      UNGCPRO;
     }
 }