Overlay properties are like text properties in that the properties that alter how a character is displayed can come from either source. But in most respects they are different. Text properties are considered a part of the text; overlays are specifically considered not to be part of the text. Thus, copying text between various buffers and strings preserves text properties, but does not try to preserve overlays. Changing a buffer's text properties marks the buffer as modified, while moving an overlay or changing its properties does not. Unlike text property changes, overlay changes are not recorded in the buffer's undo list. See section Text Properties, for comparison.
priority
priority
value is larger takes priority over the
other, and its face attributes override the face attributes of the lower
priority overlay.
Currently, all overlays take priority over text properties. Please
avoid using negative priority values, as we have not yet decided just
what they should mean.
window
window
property is non-nil
, then the overlay
applies only on that window.
category
category
property, we call it the
category of the overlay. It should be a symbol. The properties
of the symbol serve as defaults for the properties of the overlay.
face
(foreground-color . color-name)
or (background-color
. color-name)
. These elements specify just the foreground color
or just the background color; therefore, there is no need to create a
face for each color that you want to use.
mouse-face
face
when the mouse is within
the range of the overlay.
modification-hooks
nil
, and the beginning and end of the text range to be
modified.
When called after a change, each function receives five arguments: the
overlay, t
, the beginning and end of the text range just
modified, and the length of the pre-change text replaced by that range.
(For an insertion, the pre-change length is zero; for a deletion, that
length is the number of characters deleted, and the post-change
beginning and end are equal.)
insert-in-front-hooks
modification-hooks
functions.
insert-behind-hooks
modification-hooks
functions.
invisible
invisible
property can make the text in the overlay
invisible, which means that it does not appear on the screen.
See section Invisible Text, for details.
intangible
intangible
property on an overlay works just like the
intangible
text property. See section Properties with Special Meanings, for details.
isearch-open-invisible
isearch-open-invisible-temporary
before-string
after-string
evaporate
nil
, the overlay is deleted automatically
if it ever becomes empty (i.e., if it spans no characters).
local-map
nil
, it specifies a keymap for a portion
of the text. The property's value replaces the buffer's local map, when
the character after point is within the overlay. See section Active Keymaps.
These are the functions for reading and writing the properties of an overlay.
category
property which is a
symbol, that symbol's prop property is used. Otherwise, the value
is nil
.
See also the function get-char-property
which checks both
overlay properties and text properties for a given character.
See section Examining Text Properties.
Go to the first, previous, next, last section, table of contents.