|
From: Alex S. <al...@em...> - 2004-03-07 14:09:04
|
I think the defcustoms could use an :options keyword to offer the
functions as suggestions. Here is an example:
(defcustom erc-echo-notice-always-hook
'(erc-echo-notice-in-default-buffer)
"*Specifies a list of functions to call to echo a private
notice. Each function is called with four arguments, the string
to display, the parsed server message, the target buffer (or
nil), and the sender. The functions are called in order, and all
functions are called."
:options '(erc-echo-notice-hook
erc-echo-notice-in-default-buffer
erc-echo-notice-in-target-buffer
erc-echo-notice-in-minibuffer
erc-echo-notice-in-server-buffer
erc-echo-notice-in-active-non-server-buffer
erc-echo-notice-in-active-buffer
erc-echo-notice-in-user-buffers
erc-echo-notice-in-user-and-target-buffers
erc-echo-notice-in-first-user-buffer)
:group 'erc-hooks
:type 'hook)
The info from the elisp manual which seems to indicate that this is
the correct solution for these kinds of problems:
`hook'
The value must be a list of functions (or a single function, but
that is obsolete usage). This customization type is used for hook
variables. You can use the `:options' keyword in a hook variable's
`defcustom' to specify a list of functions recommended for use in
the hook; see *Note Variable Definitions::.
and...
`:options LIST'
Specify LIST as the list of reasonable values for use in this
option. The user is not restricted to using only these values,
but they are offered as convenient alternatives.
This is meaningful only for certain types, currently including
`hook', `plist' and `alist'. See the definition of the individual
types for a description of how to use `:options'.
Alex.
--
.O. http://www.emacswiki.org/alex/
..O Schroeder's fourth law:
OOO None of your friends and coworkers share your taste in music.
|