aboutsummaryrefslogtreecommitdiffstats
path: root/src/textprop.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/textprop.c')
-rw-r--r--src/textprop.c25
1 files changed, 15 insertions, 10 deletions
diff --git a/src/textprop.c b/src/textprop.c
index bd09304ba3b..91ade8ae298 100644
--- a/src/textprop.c
+++ b/src/textprop.c
@@ -660,6 +660,7 @@ get_char_property_and_overlay (Lisp_Object position, register Lisp_Object prop,
660 660
661 set_buffer_temp (XBUFFER (object)); 661 set_buffer_temp (XBUFFER (object));
662 662
663 USE_SAFE_ALLOCA;
663 GET_OVERLAYS_AT (XINT (position), overlay_vec, noverlays, NULL, 0); 664 GET_OVERLAYS_AT (XINT (position), overlay_vec, noverlays, NULL, 0);
664 noverlays = sort_overlays (overlay_vec, noverlays, w); 665 noverlays = sort_overlays (overlay_vec, noverlays, w);
665 666
@@ -674,9 +675,11 @@ get_char_property_and_overlay (Lisp_Object position, register Lisp_Object prop,
674 if (overlay) 675 if (overlay)
675 /* Return the overlay we got the property from. */ 676 /* Return the overlay we got the property from. */
676 *overlay = overlay_vec[noverlays]; 677 *overlay = overlay_vec[noverlays];
678 SAFE_FREE ();
677 return tem; 679 return tem;
678 } 680 }
679 } 681 }
682 SAFE_FREE ();
680 } 683 }
681 684
682 if (overlay) 685 if (overlay)
@@ -1314,9 +1317,11 @@ specify the property to add.
1314If the optional fifth argument OBJECT is a buffer (or nil, which means 1317If the optional fifth argument OBJECT is a buffer (or nil, which means
1315the current buffer), START and END are buffer positions (integers or 1318the current buffer), START and END are buffer positions (integers or
1316markers). If OBJECT is a string, START and END are 0-based indices into it. */) 1319markers). If OBJECT is a string, START and END are 0-based indices into it. */)
1317 (Lisp_Object start, Lisp_Object end, Lisp_Object property, Lisp_Object value, Lisp_Object object) 1320 (Lisp_Object start, Lisp_Object end, Lisp_Object property,
1321 Lisp_Object value, Lisp_Object object)
1318{ 1322{
1319 Fadd_text_properties (start, end, list2 (property, value), object); 1323 AUTO_LIST2 (properties, property, value);
1324 Fadd_text_properties (start, end, properties, object);
1320 return Qnil; 1325 return Qnil;
1321} 1326}
1322 1327
@@ -1357,7 +1362,8 @@ into it. */)
1357 (Lisp_Object start, Lisp_Object end, Lisp_Object face, 1362 (Lisp_Object start, Lisp_Object end, Lisp_Object face,
1358 Lisp_Object append, Lisp_Object object) 1363 Lisp_Object append, Lisp_Object object)
1359{ 1364{
1360 add_text_properties_1 (start, end, list2 (Qface, face), object, 1365 AUTO_LIST2 (properties, Qface, face);
1366 add_text_properties_1 (start, end, properties, object,
1361 (NILP (append) 1367 (NILP (append)
1362 ? TEXT_PROPERTY_PREPEND 1368 ? TEXT_PROPERTY_PREPEND
1363 : TEXT_PROPERTY_APPEND)); 1369 : TEXT_PROPERTY_APPEND));
@@ -1906,7 +1912,8 @@ text_property_stickiness (Lisp_Object prop, Lisp_Object pos, Lisp_Object buffer)
1906/* Note this can GC when DEST is a buffer. */ 1912/* Note this can GC when DEST is a buffer. */
1907 1913
1908Lisp_Object 1914Lisp_Object
1909copy_text_properties (Lisp_Object start, Lisp_Object end, Lisp_Object src, Lisp_Object pos, Lisp_Object dest, Lisp_Object prop) 1915copy_text_properties (Lisp_Object start, Lisp_Object end, Lisp_Object src,
1916 Lisp_Object pos, Lisp_Object dest, Lisp_Object prop)
1910{ 1917{
1911 INTERVAL i; 1918 INTERVAL i;
1912 Lisp_Object res; 1919 Lisp_Object res;
@@ -1959,12 +1966,10 @@ copy_text_properties (Lisp_Object start, Lisp_Object end, Lisp_Object src, Lisp_
1959 plist = Fcdr (Fcdr (plist)); 1966 plist = Fcdr (Fcdr (plist));
1960 } 1967 }
1961 if (! NILP (plist)) 1968 if (! NILP (plist))
1962 { 1969 /* Must defer modifications to the interval tree in case
1963 /* Must defer modifications to the interval tree in case src 1970 src and dest refer to the same string or buffer. */
1964 and dest refer to the same string or buffer. */ 1971 stuff = Fcons (list3 (make_number (p), make_number (p + len), plist),
1965 stuff = Fcons (list3 (make_number (p), make_number (p + len), plist), 1972 stuff);
1966 stuff);
1967 }
1968 1973
1969 i = next_interval (i); 1974 i = next_interval (i);
1970 if (!i) 1975 if (!i)