signal_after_change (from, numdel, 0);
}
\f
-modify_region (start, end)
+/* Call this if you're about to change the region of BUFFER from START
+ to END. This checks the read-only properties of the region, calls
+ the necessary modification hooks, and warns the next redisplay that
+ it should pay attention to that area. */
+modify_region (buffer, start, end)
+ struct buffer *buffer;
int start, end;
{
+ struct buffer *old_buffer = current_buffer;
+
+ if (buffer != old_buffer)
+ set_buffer_internal (buffer);
+
prepare_to_modify_buffer (start, end);
if (start - 1 < beg_unchanged || unchanged_modified == MODIFF)
|| unchanged_modified == MODIFF)
end_unchanged = Z - end;
MODIFF++;
+
+ if (buffer != old_buffer)
+ set_buffer_internal (old_buffer);
}
/* Check that it is okay to modify the buffer between START and END.
Vafter_change_function = value;
}
-/* Signal a change to the buffer immediatly before it happens.
+/* Signal a change to the buffer immediately before it happens.
START and END are the bounds of the text to be changed,
as Lisp objects. */
}
}
-/* Signal a change immediatly after it happens.
+/* 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.)