[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r111275: * textprop.c (set_text_prope
From: |
Dmitry Antipov |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r111275: * textprop.c (set_text_properties_1): Do not allow NULL interval. |
Date: |
Thu, 20 Dec 2012 12:49:21 +0400 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 111275
committer: Dmitry Antipov <address@hidden>
branch nick: trunk
timestamp: Thu 2012-12-20 12:49:21 +0400
message:
* textprop.c (set_text_properties_1): Do not allow NULL interval.
Rename 4th argument since it may be buffer or string. Adjust comment.
* intervals.c (graft_intervals_info_buffer): Find an interval here.
modified:
src/ChangeLog
src/intervals.c
src/textprop.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2012-12-19 15:52:48 +0000
+++ b/src/ChangeLog 2012-12-20 08:49:21 +0000
@@ -1,3 +1,9 @@
+2012-12-20 Dmitry Antipov <address@hidden>
+
+ * textprop.c (set_text_properties_1): Do not allow NULL interval.
+ Rename 4th argument since it may be buffer or string. Adjust comment.
+ * intervals.c (graft_intervals_info_buffer): Find an interval here.
+
2012-12-19 Dmitry Antipov <address@hidden>
* coding.c (Fdetect_coding_region): Do not check start and end with
=== modified file 'src/intervals.c'
--- a/src/intervals.c 2012-10-01 06:36:54 +0000
+++ b/src/intervals.c 2012-12-20 08:49:21 +0000
@@ -1624,7 +1624,8 @@
XSETBUFFER (buf, buffer);
set_text_properties_1 (make_number (position),
make_number (position + length),
- Qnil, buf, 0);
+ Qnil, buf,
+ find_interval (tree, position));
}
/* Shouldn't be necessary. --Stef */
buffer_balance_intervals (buffer);
=== modified file 'src/textprop.c'
--- a/src/textprop.c 2012-12-03 14:13:06 +0000
+++ b/src/textprop.c 2012-12-20 08:49:21 +0000
@@ -1323,14 +1323,13 @@
}
/* Replace properties of text from START to END with new list of
- properties PROPERTIES. BUFFER is the buffer containing
+ properties PROPERTIES. OBJECT is the buffer or string containing
the text. This does not obey any hooks.
- You can provide the interval that START is located in as I,
- or pass NULL for I and this function will find it.
+ You should provide the interval that START is located in as I.
START and END can be in any order. */
void
-set_text_properties_1 (Lisp_Object start, Lisp_Object end, Lisp_Object
properties, Lisp_Object buffer, INTERVAL i)
+set_text_properties_1 (Lisp_Object start, Lisp_Object end, Lisp_Object
properties, Lisp_Object object, INTERVAL i)
{
register INTERVAL prev_changed = NULL;
register ptrdiff_t s, len;
@@ -1349,8 +1348,7 @@
else
return;
- if (i == NULL)
- i = find_interval (buffer_intervals (XBUFFER (buffer)), s);
+ eassert (i);
if (i->position != s)
{
@@ -1361,11 +1359,11 @@
{
copy_properties (unchanged, i);
i = split_interval_left (i, len);
- set_properties (properties, i, buffer);
+ set_properties (properties, i, object);
return;
}
- set_properties (properties, i, buffer);
+ set_properties (properties, i, object);
if (LENGTH (i) == len)
return;
@@ -1388,7 +1386,7 @@
/* We have to call set_properties even if we are going to
merge the intervals, so as to make the undo records
and cause redisplay to happen. */
- set_properties (properties, i, buffer);
+ set_properties (properties, i, object);
if (prev_changed)
merge_interval_left (i);
return;
@@ -1399,7 +1397,7 @@
/* We have to call set_properties even if we are going to
merge the intervals, so as to make the undo records
and cause redisplay to happen. */
- set_properties (properties, i, buffer);
+ set_properties (properties, i, object);
if (!prev_changed)
prev_changed = i;
else
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r111275: * textprop.c (set_text_properties_1): Do not allow NULL interval.,
Dmitry Antipov <=