Next: , Up: Functions for Writing New Overlay Classes

4.3.1 Standard Parse and Suicide Functions

All the standard overlay classes define their own parse and suicide functions (none of them require a match function), which can be used to create new “derived” classes based on the standard ones. This is the easiest and most common way to create a new class. For example, the new class may behave exactly like one of the standard classes, but perform some additional processing whenever an overlay is created, destroyed, or matched. The parse and suicide functions for the new class should perform whatever additional processing is required, and call the standard class functions to deal with creating and destroying the overlay.

All the standard parse and suicide functions follow the same naming convention (see Integrating New Overlay Classes), where class is the name of the overlay class (one of word, line, self, nested or flat, see Overview):

(auto-o-parse-class-match o-match)
Parse a new match overlay o-match whose class is class. This will create or update auto-overlays, as appropriate for the class.
(auto-o-class-suicide o-match)
Delete or update auto-overlays as appropriate for overlay class class, due to the match overlay o-match no longer matching.