aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Djärv2010-01-19 15:54:57 +0100
committerJan Djärv2010-01-19 15:54:57 +0100
commitbc4b76f12a306f8fbc892e6f1e00733f3ef1981f (patch)
treeed117f27318a9e295e7df84bf5e3d40a4ce2ff6c
parent67477f30cb0f563fe124decf9391af4a980c7bfb (diff)
parenteeff0f485929b225f9b302e5957a654f4a367305 (diff)
downloademacs-bc4b76f12a306f8fbc892e6f1e00733f3ef1981f.tar.gz
emacs-bc4b76f12a306f8fbc892e6f1e00733f3ef1981f.zip
Merge from trunk
-rw-r--r--src/ChangeLog7
-rw-r--r--src/textprop.c16
2 files changed, 16 insertions, 7 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index c17788080d8..3832808dc09 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -182,6 +182,13 @@
182 * dispnew.c (change_frame_size_1): newwidth == FRAME_COLS (f) must 182 * dispnew.c (change_frame_size_1): newwidth == FRAME_COLS (f) must
183 also be true before we can return early (bug #5339). 183 also be true before we can return early (bug #5339).
184 184
1852010-01-08 Alan Mackenzie <acm@muc.de>
186
187 Fix spurious before-change-functions invocation from (insert ?\n).
188 * textprop.c (set_text_properties): rename parameter
189 `signal_after_change_p' to `coherent_change_p', and make the
190 invocation of `modify_region' conditional on it.
191
1852010-01-06 David Reitter <david.reitter@gmail.com> 1922010-01-06 David Reitter <david.reitter@gmail.com>
186 193
187 * nsfns.m (ns_get_screen): Rewrite, returning NULL for non-NS. 194 * nsfns.m (ns_get_screen): Rewrite, returning NULL for non-NS.
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. */)
1346/* Replace properties of text from START to END with new list of 1346/* Replace properties of text from START to END with new list of
1347 properties PROPERTIES. OBJECT is the buffer or string containing 1347 properties PROPERTIES. OBJECT is the buffer or string containing
1348 the text. OBJECT nil means use the current buffer. 1348 the text. OBJECT nil means use the current buffer.
1349 SIGNAL_AFTER_CHANGE_P nil means don't signal after changes. Value 1349 COHERENT_CHANGE_P nil means this is being called as an internal
1350 is nil if the function _detected_ that it did not replace any 1350 subroutine, rather than as a change primitive with checking of
1351 properties, non-nil otherwise. */ 1351 read-only, invoking change hooks, etc.. Value is nil if the
1352 function _detected_ that it did not replace any properties, non-nil
1353 otherwise. */
1352 1354
1353Lisp_Object 1355Lisp_Object
1354set_text_properties (start, end, properties, object, signal_after_change_p) 1356set_text_properties (start, end, properties, object, coherent_change_p)
1355 Lisp_Object start, end, properties, object, signal_after_change_p; 1357 Lisp_Object start, end, properties, object, coherent_change_p;
1356{ 1358{
1357 register INTERVAL i; 1359 register INTERVAL i;
1358 Lisp_Object ostart, oend; 1360 Lisp_Object ostart, oend;
@@ -1397,12 +1399,12 @@ set_text_properties (start, end, properties, object, signal_after_change_p)
1397 return Qnil; 1399 return Qnil;
1398 } 1400 }
1399 1401
1400 if (BUFFERP (object)) 1402 if (BUFFERP (object) && !NILP (coherent_change_p))
1401 modify_region (XBUFFER (object), XINT (start), XINT (end), 1); 1403 modify_region (XBUFFER (object), XINT (start), XINT (end), 1);
1402 1404
1403 set_text_properties_1 (start, end, properties, object, i); 1405 set_text_properties_1 (start, end, properties, object, i);
1404 1406
1405 if (BUFFERP (object) && !NILP (signal_after_change_p)) 1407 if (BUFFERP (object) && !NILP (coherent_change_p))
1406 signal_after_change (XINT (start), XINT (end) - XINT (start), 1408 signal_after_change (XINT (start), XINT (end) - XINT (start),
1407 XINT (end) - XINT (start)); 1409 XINT (end) - XINT (start));
1408 return Qt; 1410 return Qt;