When a description is provided through define-key using a definition
like ("description" . def) place a additional binding in the map to a "pseudo
key" making it easy for which-key to find these descriptions on the fly and at
the right time (i.e., when the binding is active).
which-key-enable-extended-define-key must be enabled for this to have an
effect.
Adds supporting which-key--process-define-key-args.
The docstring for the option is
Advise `define-key' to make which-key aware of definitions of the form
(define-key KEYMAP KEY '("DESCRIPTION" . DEF))
With the advice, this definition will have the side effect of creating a
replacement in `which-key-replacement-alist' that replaces DEF with DESCRIPTION
when the key sequence ends in KEY. Using a cons cell like this is a valid
definition for `define-key'. All this does is to make which-key aware of it.
Since many higher level keybinding functions use `define-key' internally, this
will affect most if not all of those as well.
This variable must be set before loading which-key.
This is a new function to discover bindings, including evil ones, in the keymap
of the current major mode. It should be considered experimental at the moment.
which-key-C-h-dispatch was not doing anything different if the which-key buffer
was not showing. This makes it fall back to the standard Emacs behavior.
Fixes#172
* which-key.el (which-key--compute-binding): Add
(which-key--get-current-bindings): Modify to use prev function
(which-key-compute-remaps): Add option
Fixes#169
Set which-key-show-transient-maps to a non-nil value to use this feature.
When a transient map is active and it is not a hydra, show the keys from the
map.
Fixes#164
Add which-key-allow-multiple-replacements which can be set to allow multiple
replacements from which-key-replacement-alist to apply to a key binding.
Switch from using assoc-default to find replacements to
which-key--get-replacements.
Adjusts tests and add a new one for multiple replacements.