(guile.info.gz) Hooks
Info Catalog
(guile.info.gz) General Conversion
(guile.info.gz) Utility Functions
24.6 Hooks
==========
A hook is a list of procedures to be called at well defined points in
time. Typically, an application provides a hook H and promises its
users that it will call all of the procedures in H at a defined point
in the application's processing. By adding its own procedure to H, an
application user can tap into or even influence the progress of the
application.
Guile itself provides several such hooks for debugging and
customization purposes: these are listed in a subsection below.
When an application first creates a hook, it needs to know how many
arguments will be passed to the hook's procedures when the hook is run.
The chosen number of arguments (which may be none) is declared when the
hook is created, and all the procedures that are added to that hook must
be capable of accepting that number of arguments.
A hook is created using `make-hook'. A procedure can be added to or
removed from a hook using `add-hook!' or `remove-hook!', and all of a
hook's procedures can be removed together using `reset-hook!'. When an
application wants to run a hook, it does so using `run-hook'.
Menu
* Hook Example Hook usage by example.
* Hook Reference Reference of all hook procedures.
* C Hooks Hooks for use from C code.
* Guile Hooks Hooks provided by Guile.
Info Catalog
(guile.info.gz) General Conversion
(guile.info.gz) Utility Functions
automatically generated byinfo2html