# HG changeset patch # User Gerd Moellmann # Date 1000212324 0 # Node ID 989367eb5ce1c28a80e47d64e55870bdf14e75d6 # Parent 01728833d5415a49543701a7a69ec252bd47dd6b (verify_interval_modification): Fix last change. diff -r 01728833d541 -r 989367eb5ce1 src/textprop.c --- a/src/textprop.c Tue Sep 11 12:32:50 2001 +0000 +++ b/src/textprop.c Tue Sep 11 12:45:24 2001 +0000 @@ -1902,7 +1902,7 @@ 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 @@ 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 @@ /* 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; } }