aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlan Mackenzie2010-01-08 13:41:42 +0000
committerAlan Mackenzie2010-01-08 13:41:42 +0000
commit9c34521302b71eee8415a3e341870e2297b8381a (patch)
treeeede463e3a78372c82945f94142290fa90d80e3c /src
parent9bbe0828a0871985dfc8e1ba82020280efdaeb36 (diff)
downloademacs-9c34521302b71eee8415a3e341870e2297b8381a.tar.gz
emacs-9c34521302b71eee8415a3e341870e2297b8381a.zip
Fix spurious before-change-functions invocation from (insert ?\n).
textprop.c (set_text_properties): rename parameter `signal_after_change_p' to `coherent_change_p', and make the invocation of `modify_region' conditional on it. ------------- This line and the following will be ignored -------------- modified: src/ChangeLog src/textprop.c unknown: Makefile config.log config.status doc/emacs/Makefile doc/lispintro/Makefile doc/lispref/Makefile doc/misc/Makefile etc/DOC-23.1.91.1 leim/Makefile leim/changed.misc leim/changed.tit lib-src/Makefile lib-src/Makefile.c lib-src/b2m lib-src/ctags lib-src/digest-doc lib-src/ebrowse lib-src/emacsclient lib-src/etags lib-src/fakemail lib-src/hexl lib-src/make-docfile lib-src/movemail lib-src/profile lib-src/sorted-doc lib-src/test-distrib lib-src/update-game-score lisp/Makefile lwlib/Makefile oldXMenu/Makefile src/Makefile src/Makefile.c src/bootstrap-emacs src/deps/ src/emacs src/emacs-23.1.91.1 src/prefix-args src/stamp-oldxmenu src/temacs
Diffstat (limited to 'src')
-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 73000341f68..2da31448bed 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,10 @@
12010-01-08 Alan Mackenzie <acm@muc.de>
2
3 Fix spurious before-change-functions invocation from (insert ?\n).
4 * textprop.c (set_text_properties): rename parameter
5 `signal_after_change_p' to `coherent_change_p', and make the
6 invocation of `modify_region' conditional on it.
7
12010-01-01 Chong Yidong <cyd@stupidchicken.com> 82010-01-01 Chong Yidong <cyd@stupidchicken.com>
2 9
3 * lread.c (syms_of_lread): Make it clearer that these are the 10 * lread.c (syms_of_lread): Make it clearer that these are the
diff --git a/src/textprop.c b/src/textprop.c
index 3df5cc9204d..f7952e30d2f 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;