[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r99376: Suppress spurious second invo
From: |
Alan Mackenzie |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r99376: Suppress spurious second invocation of before-change-functions |
Date: |
Tue, 19 Jan 2010 13:16:01 +0000 |
User-agent: |
Bazaar (2.0.2) |
------------------------------------------------------------
revno: 99376 [merge]
committer: Alan Mackenzie <address@hidden>
branch nick: trunk
timestamp: Tue 2010-01-19 13:16:01 +0000
message:
Suppress spurious second invocation of before-change-functions
modified:
src/ChangeLog
src/textprop.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2010-01-18 16:29:00 +0000
+++ b/src/ChangeLog 2010-01-19 13:16:01 +0000
@@ -176,6 +176,13 @@
* dispnew.c (change_frame_size_1): newwidth == FRAME_COLS (f) must
also be true before we can return early (bug #5339).
+2010-01-08 Alan Mackenzie <address@hidden>
+
+ 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-06 David Reitter <address@hidden>
* nsfns.m (ns_get_screen): Rewrite, returning NULL for non-NS.
=== modified file 'src/textprop.c'
--- a/src/textprop.c 2010-01-13 08:35:10 +0000
+++ b/src/textprop.c 2010-01-19 13:16:01 +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;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r99376: Suppress spurious second invocation of before-change-functions,
Alan Mackenzie <=