summaryrefslogtreecommitdiff
path: root/src/textprop.c
diff options
context:
space:
mode:
authorGerd Moellmann <gerd@gnu.org>2001-09-11 12:45:24 +0000
committerGerd Moellmann <gerd@gnu.org>2001-09-11 12:45:24 +0000
commit0ba7995bfe5e4a109824ae17a9720adc4ad988c4 (patch)
tree6a7e809a4028df074ce8124403e2ee5a7e0af8db /src/textprop.c
parent0b04fa5fc9ffe5a8a2ec3545d5991fc9c013f8f7 (diff)
downloademacs-0ba7995bfe5e4a109824ae17a9720adc4ad988c4.tar.gz
(verify_interval_modification): Fix last change.
Diffstat (limited to 'src/textprop.c')
-rw-r--r--src/textprop.c30
1 files changed, 18 insertions, 12 deletions
diff --git a/src/textprop.c b/src/textprop.c
index 0bb2d42cdca..5bbd7ffd92a 100644
--- a/src/textprop.c
+++ b/src/textprop.c
@@ -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;
}
}