Module textprops

Source

Enums§

PropertySetType

Functions§

add_properties
Add the properties of PLIST to the interval I, or set the value of I’s property to the value of the property on PLIST if they are different.
get_char_property
get_char_property_and_overlay
get_text_property
Return the value of POSITION’s property PROP, in OBJECT. OBJECT should be a buffer or a string; if omitted or nil, it defaults to the current buffer.
modify_buffer_data 🔒
Helper function to safely modify buffer data.
next_property_change
Return the position of next property change. Scans characters forward from POSITION in OBJECT till it finds a change in some text property, then returns the position of the change. If the optional second argument OBJECT is a buffer (or nil, which means the current buffer), POSITION is a buffer position (integer or marker). If OBJECT is a string, POSITION is a 0-based index into it. Return nil if LIMIT is nil or omitted, and the property is constant all the way to the end of OBJECT; if the value is non-nil, it is a position greater than POSITION, never equal.
next_single_property_change
Return the position of next property change for a specific property. Scans characters forward from POSITION till it finds a change in the PROP property, then returns the position of the change. If the optional third argument OBJECT is a buffer (or nil, which means the current buffer), POSITION is a buffer position (integer or marker). If OBJECT is a string, POSITION is a 0-based index into it. The property values are compared with `eq’. Return nil if LIMIT is nil or omitted, and the property is constant all the way to the end of OBJECT; if the value is non-nil, it is a position greater than POSITION, never equal.
previous_property_change
Return the position of previous property change. Scans characters backwards from POSITION in OBJECT till it finds a change in some text property, then returns the position of the change. If the optional second argument OBJECT is a buffer (or nil, which means the current buffer), POSITION is a buffer position (integer or marker). If OBJECT is a string, POSITION is a 0-based index into it. Return nil if LIMIT is nil or omitted, and the property is constant all the way to the start of OBJECT; if the value is non-nil, it is a position less than POSITION, never equal.
previous_single_property_change
Return the position of next property change for a specific property. Scans characters forward from POSITION till it finds a change in the PROP property, then returns the position of the change. If the optional third argument OBJECT is a buffer (or nil, which means the current buffer), POSITION is a buffer position (integer or marker). If OBJECT is a string, POSITION is a 0-based index into it. The property values are compared with `eq’. Return nil if LIMIT is nil or omitted, and the property is constant all the way to the end of OBJECT; if the value is non-nil, it is a position greater than POSITION, never equal.
put_text_property
Set one property of the text from START to END. The third and fourth arguments PROPERTY and VALUE specify the property to add. If the optional fifth argument OBJECT is a buffer (or nil, which means the current buffer), START and END are buffer positions (integers or markers). If OBJECT is a string, START and END are 0-based indices into it.
remove_list_of_text_properties
/* Remove some properties from text from START to END. The third argument LIST-OF-PROPERTIES is a list of property names to remove. If the optional fourth argument OBJECT is a buffer (or nil, which means the current buffer), START and END are buffer positions (integers or markers). If OBJECT is a string, START and END are 0-based indices into it. Return t if any property was actually removed, nil otherwise.
remove_text_properties
Remove some properties from text from START to END. The third argument PROPERTIES is a property list whose property names specify the properties to remove. (The values stored in PROPERTIES are ignored.) If the optional fourth argument OBJECT is a buffer (or nil, which means the current buffer), START and END are buffer positions (integers or markers). If OBJECT is a string, START and END are 0-based indices into it. Return t if any property was actually removed, nil otherwise.
set_text_properties
Completely replace properties of text from START to END. The third argument PROPERTIES is the new property list. If the optional fourth argument OBJECT is a buffer (or nil, which means the current buffer), START and END are buffer positions (integers or markers). If OBJECT is a string, START and END are 0-based indices into it. If PROPERTIES is nil, the effect is to remove all properties from the designated part of OBJECT.
text_properties_any
Check text from START to END for property PROPERTY equaling VALUE. If so, return the position of the first character whose property PROPERTY is `eq’ to VALUE. Otherwise return nil. If the optional fifth argument OBJECT is a buffer (or nil, which means the current buffer), START and END are buffer positions (integers or markers). If OBJECT is a string, START and END are 0-based indices into it.
text_properties_at
Return the list of properties of the character at POSITION in OBJECT. If the optional second argument OBJECT is a buffer (or nil, which means the current buffer), POSITION is a buffer position (integer or marker).
text_properties_not_all
Check text from START to END for property PROPERTY not equaling VALUE. If so, return the position of the first character whose property PROPERTY is not `eq’ to VALUE. Otherwise, return nil. If the optional fifth argument OBJECT is a buffer (or nil, which means the current buffer), START and END are buffer positions (integers or markers). If OBJECT is a string, START and END are 0-based indices into it.