summaryrefslogtreecommitdiff
path: root/src/insdel.c
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1994-09-02 23:30:24 +0000
committerRichard M. Stallman <rms@gnu.org>1994-09-02 23:30:24 +0000
commit0ff8c5400d32be1b25063b204e0bc142913318d5 (patch)
tree2679fd3cfd217fead9f9762fdbcf304a6fe0e353 /src/insdel.c
parentc9dd71a50edded0bf789f1297199ebd35e8668e5 (diff)
downloademacs-0ff8c5400d32be1b25063b204e0bc142913318d5.tar.gz
(prepare_to_modify_buffer): Don't call verify_overlay_modification if
no overlays, or verify_interval_modification no intervals. (insert_1): Don't call interval fns if buffer has none.
Diffstat (limited to 'src/insdel.c')
-rw-r--r--src/insdel.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/insdel.c b/src/insdel.c
index c071d08dc62..1b9862c00c3 100644
--- a/src/insdel.c
+++ b/src/insdel.c
@@ -350,8 +350,11 @@ insert_1 (string, length, inherit)
bcopy (string, GPT_ADDR, length);
- /* Only defined if Emacs is compiled with USE_TEXT_PROPERTIES */
- offset_intervals (current_buffer, PT, length);
+#ifdef USE_TEXT_PROPERTIES
+ if (current_buffer->intervals != 0)
+ /* Only defined if Emacs is compiled with USE_TEXT_PROPERTIES. */
+ offset_intervals (current_buffer, PT, length);
+#endif
GAP_SIZE -= length;
GPT += length;
@@ -359,9 +362,11 @@ insert_1 (string, length, inherit)
Z += length;
adjust_point (length);
- if (!inherit)
+#ifdef USE_TEXT_PROPERTIES
+ if (!inherit && current_buffer->intervals != 0)
Fset_text_properties (make_number (PT - length), make_number (PT),
Qnil, Qnil);
+#endif
}
/* Insert the part of the text of STRING, a Lisp object assumed to be
@@ -595,9 +600,12 @@ prepare_to_modify_buffer (start, end)
Fbarf_if_buffer_read_only ();
/* Only defined if Emacs is compiled with USE_TEXT_PROPERTIES */
- verify_interval_modification (current_buffer, start, end);
+ if (current_buffer->intervals != 0)
+ verify_interval_modification (current_buffer, start, end);
- verify_overlay_modification (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)