1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-31 01:20:37 -08:00

(signal_before_change, signal_after_change):

Call verify_overlay_modification here.
(prepare_to_modify_buffer): Don't call it here.
This commit is contained in:
Richard M. Stallman 1994-12-11 11:24:16 +00:00
parent 5296fd1855
commit d07c080423

View file

@ -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));
}