1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-04 02:51:31 -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:
Richard M. Stallman 1996-09-26 03:48:10 +00:00
parent 524580a4ac
commit 2a631db1ae

View file

@ -871,6 +871,7 @@ Return t if any property value actually changed, nil otherwise.")
}
}
if (BUFFERP (object))
modify_region (XBUFFER (object), XINT (start), XINT (end));
/* We are at the beginning of interval I, with LEN chars to scan. */
@ -888,6 +889,7 @@ Return t if any property value actually changed, nil otherwise.")
if (interval_has_all_properties (properties, i))
{
if (BUFFERP (object))
signal_after_change (XINT (start), XINT (end) - XINT (start),
XINT (end) - XINT (start));
@ -897,6 +899,7 @@ Return t if any property value actually changed, nil otherwise.")
if (LENGTH (i) == len)
{
add_properties (properties, i, object);
if (BUFFERP (object))
signal_after_change (XINT (start), XINT (end) - XINT (start),
XINT (end) - XINT (start));
return Qt;
@ -907,6 +910,7 @@ Return t if any property value actually changed, nil otherwise.")
i = split_interval_left (unchanged, len);
copy_properties (unchanged, i);
add_properties (properties, i, object);
if (BUFFERP (object))
signal_after_change (XINT (start), XINT (end) - XINT (start),
XINT (end) - XINT (start));
return Qt;
@ -968,10 +972,7 @@ is the string or buffer containing the text.")
if (! XSTRING (object)->intervals)
return Qt;
modify_region (XBUFFER (object), XINT (start), XINT (end));
XSTRING (object)->intervals = 0;
signal_after_change (XINT (start), XINT (end) - XINT (start),
XINT (end) - XINT (start));
return Qt;
}
@ -997,6 +998,7 @@ is the string or buffer containing the text.")
s = XINT (start);
len = XINT (end) - s;
if (BUFFERP (object))
modify_region (XBUFFER (object), XINT (start), XINT (end));
if (i->position != s)
@ -1009,6 +1011,7 @@ is the string or buffer containing the text.")
copy_properties (unchanged, i);
i = split_interval_left (i, len);
set_properties (properties, i, object);
if (BUFFERP (object))
signal_after_change (XINT (start), XINT (end) - XINT (start),
XINT (end) - XINT (start));
@ -1019,6 +1022,7 @@ is the string or buffer containing the text.")
if (LENGTH (i) == len)
{
if (BUFFERP (object))
signal_after_change (XINT (start), XINT (end) - XINT (start),
XINT (end) - XINT (start));
@ -1047,6 +1051,7 @@ is the string or buffer containing the text.")
set_properties (properties, i, object);
if (!NULL_INTERVAL_P (prev_changed))
merge_interval_left (i);
if (BUFFERP (object))
signal_after_change (XINT (start), XINT (end) - XINT (start),
XINT (end) - XINT (start));
return Qt;
@ -1066,6 +1071,7 @@ is the string or buffer containing the text.")
i = next_interval (i);
}
if (BUFFERP (object))
signal_after_change (XINT (start), XINT (end) - XINT (start),
XINT (end) - XINT (start));
return Qt;
@ -1118,6 +1124,7 @@ Return t if any property was actually removed, nil otherwise.")
}
}
if (BUFFERP (object))
modify_region (XBUFFER (object), XINT (start), XINT (end));
/* We are at the beginning of an interval, with len to scan */
@ -1134,6 +1141,7 @@ Return t if any property was actually removed, nil otherwise.")
if (LENGTH (i) == len)
{
remove_properties (properties, i, object);
if (BUFFERP (object))
signal_after_change (XINT (start), XINT (end) - XINT (start),
XINT (end) - XINT (start));
return Qt;
@ -1144,6 +1152,7 @@ Return t if any property was actually removed, nil otherwise.")
i = split_interval_left (i, len);
copy_properties (unchanged, i);
remove_properties (properties, i, object);
if (BUFFERP (object))
signal_after_change (XINT (start), XINT (end) - XINT (start),
XINT (end) - XINT (start));
return Qt;