From 3bd13e92038b96817b6709d8f65bd37bc7d70f59 Mon Sep 17 00:00:00 2001 From: Karl Heuer Date: Tue, 5 Apr 1994 03:32:07 +0000 Subject: [PATCH] (verify_overlay_modification): Run modification-hooks for any deletion that intersects the overlay. --- src/buffer.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/buffer.c b/src/buffer.c index 8cb523596a2..d8742eb2c61 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -2057,9 +2057,9 @@ verify_overlay_modification (start, end) call_overlay_mod_hooks (prop, overlay, start, end); } } - if (insertion - ? (XFASTINT (start) > startpos && XFASTINT (end) < endpos) - : (XFASTINT (start) >= startpos && XFASTINT (end) <= endpos)) + /* Test for intersecting intervals. This does the right thing + for both insertion and deletion. */ + if (XFASTINT (end) > startpos && XFASTINT (start) < endpos) { prop = Foverlay_get (overlay, Qmodification_hooks); if (!NILP (prop)) @@ -2103,9 +2103,9 @@ verify_overlay_modification (start, end) call_overlay_mod_hooks (prop, overlay, start, end); } } - if (insertion - ? (XFASTINT (start) > startpos && XFASTINT (end) < endpos) - : (XFASTINT (start) >= startpos && XFASTINT (end) <= endpos)) + /* Test for intersecting intervals. This does the right thing + for both insertion and deletion. */ + if (XFASTINT (end) > startpos && XFASTINT (start) < endpos) { prop = Foverlay_get (overlay, Qmodification_hooks); if (!NILP (prop)) -- 2.39.5