1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-08 12:40:49 -08:00

(verify_overlay_modification):

Copy TAIL before a hook, in case the hook recenters the overlay lists.
This commit is contained in:
Richard M. Stallman 1994-03-30 06:32:54 +00:00
parent 37e9a9347d
commit 5fb5aa335e

View file

@ -2044,19 +2044,32 @@ verify_overlay_modification (start, end)
if (XFASTINT (end) == startpos && insertion)
{
prop = Foverlay_get (overlay, Qinsert_in_front_hooks);
call_overlay_mod_hooks (prop, overlay, start, end);
if (!NILP (prop))
{
/* Copy TAIL in case the hook recenters the overlay lists. */
tail = Fcopy_sequence (tail);
call_overlay_mod_hooks (prop, overlay, start, end);
}
}
if (XFASTINT (start) == endpos && insertion)
{
prop = Foverlay_get (overlay, Qinsert_behind_hooks);
call_overlay_mod_hooks (prop, overlay, start, end);
if (!NILP (prop))
{
tail = Fcopy_sequence (tail);
call_overlay_mod_hooks (prop, overlay, start, end);
}
}
if (insertion
? (XFASTINT (start) > startpos && XFASTINT (end) < endpos)
: (XFASTINT (start) >= startpos && XFASTINT (end) <= endpos))
{
prop = Foverlay_get (overlay, Qmodification_hooks);
call_overlay_mod_hooks (prop, overlay, start, end);
if (!NILP (prop))
{
tail = Fcopy_sequence (tail);
call_overlay_mod_hooks (prop, overlay, start, end);
}
}
}
@ -2078,19 +2091,31 @@ verify_overlay_modification (start, end)
if (XFASTINT (end) == startpos && insertion)
{
prop = Foverlay_get (overlay, Qinsert_in_front_hooks);
call_overlay_mod_hooks (prop, overlay, start, end);
if (!NILP (prop))
{
tail = Fcopy_sequence (tail);
call_overlay_mod_hooks (prop, overlay, start, end);
}
}
if (XFASTINT (start) == endpos && insertion)
{
prop = Foverlay_get (overlay, Qinsert_behind_hooks);
call_overlay_mod_hooks (prop, overlay, start, end);
if (!NILP (prop))
{
tail = Fcopy_sequence (tail);
call_overlay_mod_hooks (prop, overlay, start, end);
}
}
if (insertion
? (XFASTINT (start) > startpos && XFASTINT (end) < endpos)
: (XFASTINT (start) >= startpos && XFASTINT (end) <= endpos))
{
prop = Foverlay_get (overlay, Qmodification_hooks);
call_overlay_mod_hooks (prop, overlay, start, end);
if (!NILP (prop))
{
tail = Fcopy_sequence (tail);
call_overlay_mod_hooks (prop, overlay, start, end);
}
}
}
}