mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-23 16:30:46 -08:00
Add which-key-manual-update
Intended to be used for prefix-help-command Ref #66
This commit is contained in:
parent
da2e093e91
commit
5cbfccd5fe
1 changed files with 17 additions and 0 deletions
17
which-key.el
17
which-key.el
|
|
@ -2583,6 +2583,23 @@ Finally, show the buffer."
|
|||
(kbd which-key--god-mode-key-string))))
|
||||
this-command-keys))
|
||||
|
||||
;;;###autoload
|
||||
(defun which-key-manual-update ()
|
||||
"Force which-key update.
|
||||
|
||||
This command is intended to be used for `prefix-help-command', as
|
||||
follows
|
||||
|
||||
\(setq prefix-help-command 'which-key-manual-update).
|
||||
|
||||
This should be set after activating `which-key-mode'."
|
||||
(interactive)
|
||||
(let* ((current-prefix
|
||||
(butlast
|
||||
(listify-key-sequence (which-key--this-command-keys)))))
|
||||
(which-key-reload-key-sequence current-prefix)
|
||||
(which-key--start-timer 0 t)))
|
||||
|
||||
(defun which-key--update ()
|
||||
"Function run by timer to possibly trigger
|
||||
`which-key--create-buffer-and-show'."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue