aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1994-09-02 23:30:24 +0000
committerRichard M. Stallman1994-09-02 23:30:24 +0000
commit648c4c550421b35ed9cddb2f798145f671863869 (patch)
tree5dbe32a17f67fad7e1da099cf1e6fbcb0542b400 /src
parentfacc570e2b1f74c98ccd7808cc7601c01bfa9f63 (diff)
downloademacs-648c4c550421b35ed9cddb2f798145f671863869.tar.gz
emacs-648c4c550421b35ed9cddb2f798145f671863869.zip
(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')
-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)
350 350
351 bcopy (string, GPT_ADDR, length); 351 bcopy (string, GPT_ADDR, length);
352 352
353 /* Only defined if Emacs is compiled with USE_TEXT_PROPERTIES */ 353#ifdef USE_TEXT_PROPERTIES
354 offset_intervals (current_buffer, PT, length); 354 if (current_buffer->intervals != 0)
355 /* Only defined if Emacs is compiled with USE_TEXT_PROPERTIES. */
356 offset_intervals (current_buffer, PT, length);
357#endif
355 358
356 GAP_SIZE -= length; 359 GAP_SIZE -= length;
357 GPT += length; 360 GPT += length;
@@ -359,9 +362,11 @@ insert_1 (string, length, inherit)
359 Z += length; 362 Z += length;
360 adjust_point (length); 363 adjust_point (length);
361 364
362 if (!inherit) 365#ifdef USE_TEXT_PROPERTIES
366 if (!inherit && current_buffer->intervals != 0)
363 Fset_text_properties (make_number (PT - length), make_number (PT), 367 Fset_text_properties (make_number (PT - length), make_number (PT),
364 Qnil, Qnil); 368 Qnil, Qnil);
369#endif
365} 370}
366 371
367/* Insert the part of the text of STRING, a Lisp object assumed to be 372/* Insert the part of the text of STRING, a Lisp object assumed to be
@@ -595,9 +600,12 @@ prepare_to_modify_buffer (start, end)
595 Fbarf_if_buffer_read_only (); 600 Fbarf_if_buffer_read_only ();
596 601
597 /* Only defined if Emacs is compiled with USE_TEXT_PROPERTIES */ 602 /* Only defined if Emacs is compiled with USE_TEXT_PROPERTIES */
598 verify_interval_modification (current_buffer, start, end); 603 if (current_buffer->intervals != 0)
604 verify_interval_modification (current_buffer, start, end);
599 605
600 verify_overlay_modification (start, end); 606 if (!NILP (current_buffer->overlays_before)
607 || !NILP (current_buffer->overlays_after))
608 verify_overlay_modification (start, end);
601 609
602#ifdef CLASH_DETECTION 610#ifdef CLASH_DETECTION
603 if (!NILP (current_buffer->filename) 611 if (!NILP (current_buffer->filename)