Next: , Previous: Functions for Writing New Overlay Classes, Up: Extending the Auto-Overlays Package


4.4 Auto-Overlay Hooks

The auto-overlays package defines two hooks, that are called when auto-overlays are enabled and disabled in a buffer. These are intended to be used by overlay classes to set up any extra buffer-local variables and settings they require, and clean them up afterwards. (There is no point leaving auto-overlay variables and settings hanging around in a buffer when auto-overlays are not in use.)

auto-overlay-load-hook
This hook is run when the first auto-overlay regexp set in a buffer is started, using the auto-overlay-start function. See Starting and Stopping Auto-Overlays.
auto-overlay-unload-hook
This hook is run when the last auto-overlay regexp set in a buffer is stopped, using the auto-overlay-stop function. See Starting and Stopping Auto-Overlays.