Hyperbole User Manual
10.1 Hook Variables
Hyperbole provides a number of hook variables that allow you to adjust
its basic operations to meet your own needs, without requiring you to
change the code for those operations.
We find it best to always set the value of hook variables either to nil
or to a list of function names of no arguments, each of which will be
called in sequence when the hook is triggered.
Given the name of a function, a Hyperbole hook variable triggered within
that function has the same name as the function with a -hook
appended. Hyperbole provides the following hook variables:
- hyperb:init-hook
- For customization at Hyperbole initialization time. Use this to load
any personal Hyperbole type definitions you might have. It is run after
Hyperbole support code is loaded but before Hyperbole session
initializations take place.
- action:act-hook
- Run before each Hyperbole button activation.
The variable hbut:current contains the button to be activated when
this is run.
- ebut:create-hook
- To add to the Hyperbole explicit button creation process.
- ebut:delete-hook
- To add to the Hyperbole explicit button deletion process.
- ebut:modify-hook
- Executed when an explicit button's attributes are modified.
- hibtypes:begin-load-hook
- Executed prior to loading of standard Hyperbole implicit button types.
Used to load site-specific low priority implicit button types since
lowest priority ibtypes are loaded first.
- hibtypes:end-load-hook
- Executed after loading of standard Hyperbole implicit button types.
Used to load site-specific high priority implicit button types since
highest priority ibtypes are loaded last.
- htype:create-hook
- Executed when a Hyperbole type (e.g. action type or implicit button
type) is added to the environment.
- htype:delete-hook
- Executed when a type is deleted from the environment.
- kotl-mode-hook
- Executed when a Koutline is created or read in or when kotl-mode is
invoked.
- wrolo-display-hook
- Executed when rolodex matches are displayed.
- wrolo-mode-hook
- Executed when a rolodex match buffer is created and put into wrolo-mode.
- wrolo-yank-reformat-function
- A variable whose value may be set to a function of two arguments, START
and END, indicating the region of the rolodex entry yanked into the
current buffer by the rolo-yank command. The function may reformat this
region to meed user-specific needs.
Hyperbole also makes use of a number of external Emacs hook variables.
- find-file-hooks
- This is called whenever a file is read into a GNU Emacs buffer.
Hyperbole uses it to highlight any buttons within files when run under
any NEXTSTEP or X window system-based versions of GNU Emacs.
- write-file-hooks
- This is called whenever a GNU Emacs buffer is written to a file.
Hyperbole uses it to save any modified button data associated with the
file's directory.
Hyperbole mail and news facilities also utilize a number of external hook
variables. These hide button data and highlight buttons if possible.
See the various support files for details.