Next: , Previous: Dynamic Completion, Up: Completing Words


4.5 Completion Hotkeys

When the customisation variable completion-use-hotkeys is non-nil, you will be able to select a completion by typing a single character (the numerical characters 09 are used by default).

You will probably also want to display a list of the possible completions, so that you know which completion will be selected by each of these “hotkeys” (see Displaying Completions in the Echo Area, and Completion Tooltip). By setting completion-use-hotkeys to pop-up, the hotkeys will only be enabled when the tooltip or pop-up frame (see Pop-Up Frame) are displayed.

The following variables affect the behaviour of the completion hotkeys:

completion-use-hotkeys
When non-nil, enable completion hotkeys, allowing completion candidates to be selected by hitting a single key. When set to the symbol pop-up, the hotkeys are only enabled when the tooltip (see Completion Tooltip) or pop-up frame (see Pop-Up Frame) are displayed.
completion-hotkey-list
List of keys to use for selecting completions. Default is numerical characters 0 to 9. Note that this variable must be set before loading the predictive mode libraries, e.g. in your .emacs file. See Keymaps and Key Bindings.

Of course, however many characters are in completion-hotkey-list, there cannot be more completions available than the number actually found! The maximum number to find is limited by completion-max-candidates, Miscellaneous Options.