summaryrefslogtreecommitdiff
path: root/src/textprop.c
diff options
context:
space:
mode:
authorJan Djärv <jan.h.d@swipnet.se>2010-01-19 15:54:57 +0100
committerJan Djärv <jan.h.d@swipnet.se>2010-01-19 15:54:57 +0100
commitbc4b76f12a306f8fbc892e6f1e00733f3ef1981f (patch)
treeed117f27318a9e295e7df84bf5e3d40a4ce2ff6c /src/textprop.c
parent67477f30cb0f563fe124decf9391af4a980c7bfb (diff)
parenteeff0f485929b225f9b302e5957a654f4a367305 (diff)
downloademacs-bc4b76f12a306f8fbc892e6f1e00733f3ef1981f.tar.gz
emacs-bc4b76f12a306f8fbc892e6f1e00733f3ef1981f.tar.bz2
emacs-bc4b76f12a306f8fbc892e6f1e00733f3ef1981f.zip
Merge from trunk
Diffstat (limited to 'src/textprop.c')
-rw-r--r--src/textprop.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/textprop.c b/src/textprop.c
index fee73321deb..83d09cce558 100644
--- a/src/textprop.c
+++ b/src/textprop.c
@@ -1346,13 +1346,15 @@ the designated part of OBJECT. */)
/* Replace properties of text from START to END with new list of
properties PROPERTIES. OBJECT is the buffer or string containing
the text. OBJECT nil means use the current buffer.
- SIGNAL_AFTER_CHANGE_P nil means don't signal after changes. Value
- is nil if the function _detected_ that it did not replace any
- properties, non-nil otherwise. */
+ COHERENT_CHANGE_P nil means this is being called as an internal
+ subroutine, rather than as a change primitive with checking of
+ read-only, invoking change hooks, etc.. Value is nil if the
+ function _detected_ that it did not replace any properties, non-nil
+ otherwise. */
Lisp_Object
-set_text_properties (start, end, properties, object, signal_after_change_p)
- Lisp_Object start, end, properties, object, signal_after_change_p;
+set_text_properties (start, end, properties, object, coherent_change_p)
+ Lisp_Object start, end, properties, object, coherent_change_p;
{
register INTERVAL i;
Lisp_Object ostart, oend;
@@ -1397,12 +1399,12 @@ set_text_properties (start, end, properties, object, signal_after_change_p)
return Qnil;
}
- if (BUFFERP (object))
+ if (BUFFERP (object) && !NILP (coherent_change_p))
modify_region (XBUFFER (object), XINT (start), XINT (end), 1);
set_text_properties_1 (start, end, properties, object, i);
- if (BUFFERP (object) && !NILP (signal_after_change_p))
+ if (BUFFERP (object) && !NILP (coherent_change_p))
signal_after_change (XINT (start), XINT (end) - XINT (start),
XINT (end) - XINT (start));
return Qt;