Mercurial > emacs
changeset 106904:943a92f3710b
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
author | Alan Mackenzie <acm@muc.de> |
---|---|
date | Fri, 08 Jan 2010 13:41:42 +0000 |
parents | 4af83423a0f1 |
children | 1f446f261ed0 |
files | src/ChangeLog src/textprop.c |
diffstat | 2 files changed, 16 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog Fri Jan 01 15:03:37 2010 -0500 +++ b/src/ChangeLog Fri Jan 08 13:41:42 2010 +0000 @@ -1,3 +1,10 @@ +2010-01-08 Alan Mackenzie <acm@muc.de> + + 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. + 2010-01-01 Chong Yidong <cyd@stupidchicken.com> * lread.c (syms_of_lread): Make it clearer that these are the
--- a/src/textprop.c Fri Jan 01 15:03:37 2010 -0500 +++ b/src/textprop.c Fri Jan 08 13:41:42 2010 +0000 @@ -1346,13 +1346,15 @@ /* 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 @@ 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;