summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1994-12-11 11:24:16 +0000
committerRichard M. Stallman <rms@gnu.org>1994-12-11 11:24:16 +0000
commit871381dd5ada5dcc419959f11b4d4eec37019a89 (patch)
tree166c80111278e17871be3113d32a6620b0dae78a /src
parent8c07a7e02f98aae50e675b3927eb80a8a24bc4a4 (diff)
downloademacs-871381dd5ada5dcc419959f11b4d4eec37019a89.tar.gz
(signal_before_change, signal_after_change):
Call verify_overlay_modification here. (prepare_to_modify_buffer): Don't call it here.
Diffstat (limited to 'src')
-rw-r--r--src/insdel.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/src/insdel.c b/src/insdel.c
index 47e75298005..d2f3fb85b71 100644
--- a/src/insdel.c
+++ b/src/insdel.c
@@ -683,10 +683,6 @@ prepare_to_modify_buffer (start, end)
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 @@ signal_before_change (start, end)
}
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 @@ signal_after_change (pos, lendel, lenins)
}
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));
}