mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-04 11:00:45 -08:00
(Fset_text_properties, Fadd_text_properties)
(Fremove_text_properties): Call modify_region and signal_after_change only for buffers, not for strings.
This commit is contained in:
parent
524580a4ac
commit
2a631db1ae
1 changed files with 33 additions and 24 deletions
|
|
@ -871,7 +871,8 @@ Return t if any property value actually changed, nil otherwise.")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
modify_region (XBUFFER (object), XINT (start), XINT (end));
|
if (BUFFERP (object))
|
||||||
|
modify_region (XBUFFER (object), XINT (start), XINT (end));
|
||||||
|
|
||||||
/* We are at the beginning of interval I, with LEN chars to scan. */
|
/* We are at the beginning of interval I, with LEN chars to scan. */
|
||||||
for (;;)
|
for (;;)
|
||||||
|
|
@ -888,8 +889,9 @@ Return t if any property value actually changed, nil otherwise.")
|
||||||
|
|
||||||
if (interval_has_all_properties (properties, i))
|
if (interval_has_all_properties (properties, i))
|
||||||
{
|
{
|
||||||
signal_after_change (XINT (start), XINT (end) - XINT (start),
|
if (BUFFERP (object))
|
||||||
XINT (end) - XINT (start));
|
signal_after_change (XINT (start), XINT (end) - XINT (start),
|
||||||
|
XINT (end) - XINT (start));
|
||||||
|
|
||||||
return modified ? Qt : Qnil;
|
return modified ? Qt : Qnil;
|
||||||
}
|
}
|
||||||
|
|
@ -897,8 +899,9 @@ Return t if any property value actually changed, nil otherwise.")
|
||||||
if (LENGTH (i) == len)
|
if (LENGTH (i) == len)
|
||||||
{
|
{
|
||||||
add_properties (properties, i, object);
|
add_properties (properties, i, object);
|
||||||
signal_after_change (XINT (start), XINT (end) - XINT (start),
|
if (BUFFERP (object))
|
||||||
XINT (end) - XINT (start));
|
signal_after_change (XINT (start), XINT (end) - XINT (start),
|
||||||
|
XINT (end) - XINT (start));
|
||||||
return Qt;
|
return Qt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -907,8 +910,9 @@ Return t if any property value actually changed, nil otherwise.")
|
||||||
i = split_interval_left (unchanged, len);
|
i = split_interval_left (unchanged, len);
|
||||||
copy_properties (unchanged, i);
|
copy_properties (unchanged, i);
|
||||||
add_properties (properties, i, object);
|
add_properties (properties, i, object);
|
||||||
signal_after_change (XINT (start), XINT (end) - XINT (start),
|
if (BUFFERP (object))
|
||||||
XINT (end) - XINT (start));
|
signal_after_change (XINT (start), XINT (end) - XINT (start),
|
||||||
|
XINT (end) - XINT (start));
|
||||||
return Qt;
|
return Qt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -968,10 +972,7 @@ is the string or buffer containing the text.")
|
||||||
if (! XSTRING (object)->intervals)
|
if (! XSTRING (object)->intervals)
|
||||||
return Qt;
|
return Qt;
|
||||||
|
|
||||||
modify_region (XBUFFER (object), XINT (start), XINT (end));
|
|
||||||
XSTRING (object)->intervals = 0;
|
XSTRING (object)->intervals = 0;
|
||||||
signal_after_change (XINT (start), XINT (end) - XINT (start),
|
|
||||||
XINT (end) - XINT (start));
|
|
||||||
return Qt;
|
return Qt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -997,7 +998,8 @@ is the string or buffer containing the text.")
|
||||||
s = XINT (start);
|
s = XINT (start);
|
||||||
len = XINT (end) - s;
|
len = XINT (end) - s;
|
||||||
|
|
||||||
modify_region (XBUFFER (object), XINT (start), XINT (end));
|
if (BUFFERP (object))
|
||||||
|
modify_region (XBUFFER (object), XINT (start), XINT (end));
|
||||||
|
|
||||||
if (i->position != s)
|
if (i->position != s)
|
||||||
{
|
{
|
||||||
|
|
@ -1009,8 +1011,9 @@ is the string or buffer containing the text.")
|
||||||
copy_properties (unchanged, i);
|
copy_properties (unchanged, i);
|
||||||
i = split_interval_left (i, len);
|
i = split_interval_left (i, len);
|
||||||
set_properties (properties, i, object);
|
set_properties (properties, i, object);
|
||||||
signal_after_change (XINT (start), XINT (end) - XINT (start),
|
if (BUFFERP (object))
|
||||||
XINT (end) - XINT (start));
|
signal_after_change (XINT (start), XINT (end) - XINT (start),
|
||||||
|
XINT (end) - XINT (start));
|
||||||
|
|
||||||
return Qt;
|
return Qt;
|
||||||
}
|
}
|
||||||
|
|
@ -1019,8 +1022,9 @@ is the string or buffer containing the text.")
|
||||||
|
|
||||||
if (LENGTH (i) == len)
|
if (LENGTH (i) == len)
|
||||||
{
|
{
|
||||||
signal_after_change (XINT (start), XINT (end) - XINT (start),
|
if (BUFFERP (object))
|
||||||
XINT (end) - XINT (start));
|
signal_after_change (XINT (start), XINT (end) - XINT (start),
|
||||||
|
XINT (end) - XINT (start));
|
||||||
|
|
||||||
return Qt;
|
return Qt;
|
||||||
}
|
}
|
||||||
|
|
@ -1047,8 +1051,9 @@ is the string or buffer containing the text.")
|
||||||
set_properties (properties, i, object);
|
set_properties (properties, i, object);
|
||||||
if (!NULL_INTERVAL_P (prev_changed))
|
if (!NULL_INTERVAL_P (prev_changed))
|
||||||
merge_interval_left (i);
|
merge_interval_left (i);
|
||||||
signal_after_change (XINT (start), XINT (end) - XINT (start),
|
if (BUFFERP (object))
|
||||||
XINT (end) - XINT (start));
|
signal_after_change (XINT (start), XINT (end) - XINT (start),
|
||||||
|
XINT (end) - XINT (start));
|
||||||
return Qt;
|
return Qt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1066,8 +1071,9 @@ is the string or buffer containing the text.")
|
||||||
i = next_interval (i);
|
i = next_interval (i);
|
||||||
}
|
}
|
||||||
|
|
||||||
signal_after_change (XINT (start), XINT (end) - XINT (start),
|
if (BUFFERP (object))
|
||||||
XINT (end) - XINT (start));
|
signal_after_change (XINT (start), XINT (end) - XINT (start),
|
||||||
|
XINT (end) - XINT (start));
|
||||||
return Qt;
|
return Qt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1118,7 +1124,8 @@ Return t if any property was actually removed, nil otherwise.")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
modify_region (XBUFFER (object), XINT (start), XINT (end));
|
if (BUFFERP (object))
|
||||||
|
modify_region (XBUFFER (object), XINT (start), XINT (end));
|
||||||
|
|
||||||
/* We are at the beginning of an interval, with len to scan */
|
/* We are at the beginning of an interval, with len to scan */
|
||||||
for (;;)
|
for (;;)
|
||||||
|
|
@ -1134,8 +1141,9 @@ Return t if any property was actually removed, nil otherwise.")
|
||||||
if (LENGTH (i) == len)
|
if (LENGTH (i) == len)
|
||||||
{
|
{
|
||||||
remove_properties (properties, i, object);
|
remove_properties (properties, i, object);
|
||||||
signal_after_change (XINT (start), XINT (end) - XINT (start),
|
if (BUFFERP (object))
|
||||||
XINT (end) - XINT (start));
|
signal_after_change (XINT (start), XINT (end) - XINT (start),
|
||||||
|
XINT (end) - XINT (start));
|
||||||
return Qt;
|
return Qt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1144,8 +1152,9 @@ Return t if any property was actually removed, nil otherwise.")
|
||||||
i = split_interval_left (i, len);
|
i = split_interval_left (i, len);
|
||||||
copy_properties (unchanged, i);
|
copy_properties (unchanged, i);
|
||||||
remove_properties (properties, i, object);
|
remove_properties (properties, i, object);
|
||||||
signal_after_change (XINT (start), XINT (end) - XINT (start),
|
if (BUFFERP (object))
|
||||||
XINT (end) - XINT (start));
|
signal_after_change (XINT (start), XINT (end) - XINT (start),
|
||||||
|
XINT (end) - XINT (start));
|
||||||
return Qt;
|
return Qt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue