Next: , Up: Hooks   [Contents][Index]

5.25.1 Functions As Hooks

Some hooks only allow a single piece of code to be hooked in. Usually a normally-undefined function is used; to install your hook defined a function with the name of the hook. When the hook is to be evaluated the function is called.

Generally the name of the hook’s function will end in -function.

An alternative scheme is to use a variable to store the hook, its value should be the function to call.