diff options
| author | Richard M. Stallman | 1994-12-11 11:24:16 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-12-11 11:24:16 +0000 |
| commit | d07c080423a40cc6d21cae0fbb0e667d003f5db1 (patch) | |
| tree | 6655a70126976374822e76fa7d158dc1a654ae17 /src | |
| parent | 5296fd18553c0d62e61fa1cd80b7abb13ed38fed (diff) | |
| download | emacs-d07c080423a40cc6d21cae0fbb0e667d003f5db1.tar.gz emacs-d07c080423a40cc6d21cae0fbb0e667d003f5db1.zip | |
(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.c | 20 |
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) | |||
| 683 | if (current_buffer->intervals != 0) | 683 | if (current_buffer->intervals != 0) |
| 684 | verify_interval_modification (current_buffer, start, end); | 684 | verify_interval_modification (current_buffer, start, end); |
| 685 | 685 | ||
| 686 | if (!NILP (current_buffer->overlays_before) | ||
| 687 | || !NILP (current_buffer->overlays_after)) | ||
| 688 | verify_overlay_modification (start, end); | ||
| 689 | |||
| 690 | #ifdef CLASH_DETECTION | 686 | #ifdef CLASH_DETECTION |
| 691 | if (!NILP (current_buffer->filename) | 687 | if (!NILP (current_buffer->filename) |
| 692 | && current_buffer->save_modified >= MODIFF) | 688 | && current_buffer->save_modified >= MODIFF) |
| @@ -809,13 +805,19 @@ signal_before_change (start, end) | |||
| 809 | } | 805 | } |
| 810 | unbind_to (count, Qnil); | 806 | unbind_to (count, Qnil); |
| 811 | } | 807 | } |
| 808 | |||
| 809 | if (!NILP (current_buffer->overlays_before) | ||
| 810 | || !NILP (current_buffer->overlays_after)) | ||
| 811 | verify_overlay_modification (start, end, 0, start, end, Qnil); | ||
| 812 | } | 812 | } |
| 813 | 813 | ||
| 814 | /* Signal a change immediately after it happens. | 814 | /* Signal a change immediately after it happens. |
| 815 | POS is the address of the start of the changed text. | 815 | POS is the address of the start of the changed text. |
| 816 | LENDEL is the number of characters of the text before the change. | 816 | LENDEL is the number of characters of the text before the change. |
| 817 | (Not the whole buffer; just the part that was changed.) | 817 | (Not the whole buffer; just the part that was changed.) |
| 818 | LENINS is the number of characters in the changed text. */ | 818 | LENINS is the number of characters in the changed text. |
| 819 | |||
| 820 | (Hence POS + LENINS - LENDEL is the position after the changed text.) */ | ||
| 819 | 821 | ||
| 820 | signal_after_change (pos, lendel, lenins) | 822 | signal_after_change (pos, lendel, lenins) |
| 821 | int pos, lendel, lenins; | 823 | int pos, lendel, lenins; |
| @@ -871,4 +873,12 @@ signal_after_change (pos, lendel, lenins) | |||
| 871 | } | 873 | } |
| 872 | unbind_to (count, Qnil); | 874 | unbind_to (count, Qnil); |
| 873 | } | 875 | } |
| 876 | |||
| 877 | if (!NILP (current_buffer->overlays_before) | ||
| 878 | || !NILP (current_buffer->overlays_after)) | ||
| 879 | verify_overlay_modification (make_number (pos), | ||
| 880 | make_number (pos + lenins - lendel), | ||
| 881 | 1, | ||
| 882 | make_number (pos), make_number (pos + lenins), | ||
| 883 | make_number (lendel)); | ||
| 874 | } | 884 | } |