SXEmacs provides a variety of on-line help functions, all accessible to the user as subcommands of the prefix C-h, or on some keyboards, help. For more information about them, see Help. Here we describe some program-level interfaces to the same information.
This function finds all symbols whose names contain a match for the regular expression regexp, and returns a list of them (see Regular Expressions). It also displays the symbols in a buffer named ‘*Help*’, each with a one-line description.
If do-all is non-
nil, thenaproposalso shows key bindings for the functions that are found.If predicate is non-
nil, it should be a function to be called on each symbol that has matched regexp. Only symbols for which predicate returns a non-nilvalue are listed or displayed.In the first of the following examples,
aproposfinds all the symbols with names containing ‘exec’. In the second example, it finds and returns only those symbols that are also commands. (We don't show the output that results in the ‘*Help*’ buffer.)(apropos "exec") ⇒ (Buffer-menu-execute command-execute exec-directory exec-path execute-extended-command execute-kbd-macro executing-kbd-macro executing-macro) (apropos "exec" nil 'commandp) ⇒ (Buffer-menu-execute execute-extended-command)
aproposis used by various user-level commands, such as C-h a (hyper-apropos), a graphical front-end toapropos; and C-h A (command-apropos), which does an apropos over only those functions which are user commands.command-aproposcallsapropos, specifying a predicate to restrict the output to symbols that are commands. The call toaproposlooks like this:(apropos string t 'commandp)
The value of this variable is a local keymap for characters following the Help key, C-h.
This symbol is not a function; its function definition is actually the keymap known as
help-map. It is defined in help.el as follows:(define-key global-map "\C-h" 'help-command) (fset 'help-command help-map)
This function builds a string that explains how to restore the previous state of the windows after a help command. After building the message, it applies function to it if function is non-
nil. Otherwise it callsmessageto display it in the echo area.This function expects to be called inside a
with-output-to-temp-bufferspecial form, and expectsstandard-outputto have the value bound by that special form. For an example of its use, see the long example in Accessing Documentation.
The value of this variable is the help character—the character that SXEmacs recognizes as meaning Help. By default, it is the character ‘?\^H’ (ASCII 8), which is C-h. When SXEmacs reads this character, if
help-formis non-nilLisp expression, it evaluates that expression, and displays the result in a window if it is a string.
help-charcan be a character or a key description such ashelpor(meta h).Usually the value of
help-form's value isnil. Then the help character has no special meaning at the level of command input, and it becomes part of a key sequence in the normal way. The standard key binding of C-h is a prefix key for several general-purpose help features.The help character is special after prefix keys, too. If it has no binding as a subcommand of the prefix key, it runs
describe-prefix-bindings, which displays a list of all the subcommands of the prefix key.
If this variable is non-
nil, its value is a form to evaluate whenever the characterhelp-charis read. If evaluating the form produces a string, that string is displayed.A command that calls
next-command-eventornext-eventprobably should bindhelp-formto a non-nilexpression while it does input. (The exception is when C-h is meaningful input.) Evaluating this expression should result in a string that explains what the input is for and how to enter it properly.Entry to the minibuffer binds this variable to the value of
minibuffer-help-form(see Minibuffer Misc).
This variable holds a function to print help for a prefix character. The function is called when the user types a prefix key followed by the help character, and the help character has no binding after that prefix. The variable's default value is
describe-prefix-bindings.
This function calls
describe-bindingsto display a list of all the subcommands of the prefix key of the most recent key sequence. The prefix described consists of all but the last event of that key sequence. (The last event is, presumably, the help character.)
The following two functions are found in the library helper.
They are for modes that want to provide help without relinquishing
control, such as the “electric” modes. You must load that library
with (require 'helper) in order to use them. Their names begin
with ‘Helper’ to distinguish them from the ordinary help functions.
This command pops up a window displaying a help buffer containing a listing of all of the key bindings from both the local and global keymaps. It works by calling
describe-bindings.
This command provides help for the current mode. It prompts the user in the minibuffer with the message ‘Help (Type ? for further options)’, and then provides assistance in finding out what the key bindings are, and what the mode is intended for. It returns
nil.This can be customized by changing the map
Helper-help-map.