aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustin Burkett2019-07-31 12:12:32 -0400
committerJustin Burkett2019-07-31 12:15:26 -0400
commit5cbfccd5fec9b8f75b0933d2f0350592cebd32e8 (patch)
tree53963b4dc441ed9add3a0f67e03651b9a1a9021f
parentda2e093e916bf9ae7512c104512b92eca8fb224e (diff)
downloademacs-5cbfccd5fec9b8f75b0933d2f0350592cebd32e8.tar.gz
emacs-5cbfccd5fec9b8f75b0933d2f0350592cebd32e8.zip
Add which-key-manual-update
Intended to be used for prefix-help-command Ref #66
-rw-r--r--which-key.el17
1 files changed, 17 insertions, 0 deletions
diff --git a/which-key.el b/which-key.el
index c47c576e55e..703d9f58912 100644
--- a/which-key.el
+++ b/which-key.el
@@ -2583,6 +2583,23 @@ Finally, show the buffer."
2583 (kbd which-key--god-mode-key-string)))) 2583 (kbd which-key--god-mode-key-string))))
2584 this-command-keys)) 2584 this-command-keys))
2585 2585
2586;;;###autoload
2587(defun which-key-manual-update ()
2588 "Force which-key update.
2589
2590This command is intended to be used for `prefix-help-command', as
2591follows
2592
2593\(setq prefix-help-command 'which-key-manual-update).
2594
2595This should be set after activating `which-key-mode'."
2596 (interactive)
2597 (let* ((current-prefix
2598 (butlast
2599 (listify-key-sequence (which-key--this-command-keys)))))
2600 (which-key-reload-key-sequence current-prefix)
2601 (which-key--start-timer 0 t)))
2602
2586(defun which-key--update () 2603(defun which-key--update ()
2587 "Function run by timer to possibly trigger 2604 "Function run by timer to possibly trigger
2588`which-key--create-buffer-and-show'." 2605`which-key--create-buffer-and-show'."