An auto-overlay definition is a list of the form:
(class &optional :id entry-id regexp1 regexp2 ...)
class is one of the regexp classes described in the previous
section (see Overview). The optional
:id property should be a
symbol that can be used to uniquely identify the auto-overlay
Each regexp defines one of the regexps that make up the auto-overlay definition. It should be a list of the form
(rgxp &optional :edge edge :id subentry-id @rest property1 property2 ...)
:edge property should be one of the symbols
'end, and determines which edge of the auto-overlay this regexp
corresponds to. If
:edge is not specified, it is assumed to be
'start. Auto-overlay classes that do not require separate
end regexps ignore this property. The
property should be a symbol that can be used to uniquely identify the
regexp. Any further elements in the list are cons cells of the form
(property . value), where property is an overlay property
name (a symbol) and value its value. In its simplest form,
rgxp is a single regular expression.
If only part of the regexp should act as the delimeter (see Overview), rgxp should instead be a cons cell:
(rx . group)
where rx is a regexp that contains at least one group (see Regular Expressions), and group is an integer identifying which group should act as the delimeter.
If the overlay class requires additional groups to be specified, rgxp should instead be a list:
(rx group0 group1 ...)
where rx is a regexp. The first group0 still specifies the part that acts as the delimeter, as before. If the entire regexp should act as the delimeter, group0 must still be supplied but should be set to 0 (meaning the entire regexp). None of the standard classes make use of any additional groups, but extensions to the auto-overlays package that define new classes may. See Extending the Auto-Overlays Package.
The following functions are used to load and unload regexp definitions:
nil, the regexp is added at the end. If it is
t, the regexp is added at the beginning. If it is an integer, the regexp is added at that position in the list. Whilst the position in the list has no effect on overlay behaviour, it does determine the order in which regexps are checked, so can affect efficiency.
(auto-overlay-load-regexpset-id entry-id regexp
(auto-overlay-unload-regexpset-id entry-id subentry-id
from-bufferwith the buffer to-buffer, or the current buffer if to-buffer is null. The regexp set becomes common to both buffers, and any changes made to it in one buffer, such as loading and unloading regexp definitions, are also reflected in the other buffer. However, the regexp set can still be enabled and disabled independently in both buffers. The same regexp set can be shared between any number of buffers. To remove a shared regexp set from one of the buffers, simply unload the entire set from that buffer using auto-overlay-unload-regexp. The regexp set will remain defined in all the other buffers it was shared with.