changeset 10144:607074ed1c6d

(signal_before_change, signal_after_change): Call verify_overlay_modification here. (prepare_to_modify_buffer): Don't call it here.
author Richard M. Stallman <rms@gnu.org>
date Sun, 11 Dec 1994 11:24:16 +0000
parents 33d8e8e8d46b
children 0091da658d85
files src/insdel.c
diffstat 1 files changed, 15 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/insdel.c	Sun Dec 11 09:48:25 1994 +0000
+++ b/src/insdel.c	Sun Dec 11 11:24:16 1994 +0000
@@ -683,10 +683,6 @@
   if (current_buffer->intervals != 0)
     verify_interval_modification (current_buffer, start, end);
 
-  if (!NILP (current_buffer->overlays_before)
-      || !NILP (current_buffer->overlays_after))
-    verify_overlay_modification (start, end);
-
 #ifdef CLASH_DETECTION
   if (!NILP (current_buffer->filename)
       && current_buffer->save_modified >= MODIFF)
@@ -809,13 +805,19 @@
 	}
       unbind_to (count, Qnil);
     }
+
+  if (!NILP (current_buffer->overlays_before)
+      || !NILP (current_buffer->overlays_after))
+    verify_overlay_modification (start, end, 0, start, end, Qnil);
 }
 
 /* Signal a change immediately after it happens.
    POS is the address of the start of the changed text.
    LENDEL is the number of characters of the text before the change.
    (Not the whole buffer; just the part that was changed.)
-   LENINS is the number of characters in the changed text.  */
+   LENINS is the number of characters in the changed text.
+
+   (Hence POS + LENINS - LENDEL is the position after the changed text.)  */
 
 signal_after_change (pos, lendel, lenins)
      int pos, lendel, lenins;
@@ -871,4 +873,12 @@
 	}
       unbind_to (count, Qnil);
     }
+
+  if (!NILP (current_buffer->overlays_before)
+      || !NILP (current_buffer->overlays_after))
+    verify_overlay_modification (make_number (pos),
+				 make_number (pos + lenins - lendel),
+				 1,
+				 make_number (pos), make_number (pos + lenins),
+				 make_number (lendel));
 }