Function: object-intervals
object-intervals is a function defined in fns.c.
Signature
(object-intervals OBJECT)
Documentation
Return a copy of the text properties of OBJECT.
OBJECT must be a buffer or a string.
Altering this copy does not change the layout of the text properties in OBJECT.
Probably introduced at or before Emacs version 28.1.
Source Code
// Defined in /usr/src/emacs/src/fns.c
{
INTERVAL intervals;
if (STRINGP (object))
intervals = string_intervals (object);
else if (BUFFERP (object))
intervals = buffer_intervals (XBUFFER (object));
else
wrong_type_argument (Qbuffer_or_string_p, object);
if (! intervals)
return Qnil;
Lisp_Object collector = Qnil;
traverse_intervals (intervals, 0, collect_interval, &collector);
return Fnreverse (collector);
}