[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/which-key 43e3e3d 4/8: Fix use of describe-prefix-bindi
From: |
Stefan Monnier |
Subject: |
[elpa] externals/which-key 43e3e3d 4/8: Fix use of describe-prefix-bindings in which-key-show-standard-help |
Date: |
Mon, 7 Sep 2020 16:26:58 -0400 (EDT) |
branch: externals/which-key
commit 43e3e3d7641a8e1c298b37e6a277612bf0898708
Author: Justin Burkett <justin@burkett.cc>
Commit: Justin Burkett <justin@burkett.cc>
Fix use of describe-prefix-bindings in which-key-show-standard-help
Use describe-prefix-bindings directly if we do not enter through
which-key-C-h-dispatch.
Fixes #198
---
which-key.el | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/which-key.el b/which-key.el
index c62924d..d901a31 100644
--- a/which-key.el
+++ b/which-key.el
@@ -2193,13 +2193,18 @@ used are reapplied to the new key sequence."
"Call the command in `which-key--prefix-help-cmd-backup'.
Usually this is `describe-prefix-bindings'."
(interactive)
- (let ((which-key-inhibit t))
+ (let ((which-key-inhibit t)
+ (popup-showing (which-key--popup-showing-p)))
(which-key--hide-popup-ignore-command)
- (cond ((eq which-key--prefix-help-cmd-backup
- 'describe-prefix-bindings)
- ;; This is essentially what `describe-prefix-bindings' does
- (describe-bindings
- (kbd (which-key--current-key-string))))
+ (cond ((and (eq which-key--prefix-help-cmd-backup
+ 'describe-prefix-bindings)
+ ;; If the popup is not showing, we call
+ ;; `describe-prefix-bindings' directly.
+ popup-showing)
+ ;; This is essentially what `describe-prefix-bindings' does. We
can't
+ ;; use this function directly, because the prefix will not be
correct
+ ;; when we enter using `which-key-C-h-dispatch'.
+ (describe-bindings (kbd (which-key--current-key-string))))
((functionp which-key--prefix-help-cmd-backup)
(funcall which-key--prefix-help-cmd-backup)))))
- [elpa] branch externals/which-key created (now 9c5922e), Stefan Monnier, 2020/09/07
- [elpa] externals/which-key 013cdb7 1/8: Make Travis test on v26.1, Stefan Monnier, 2020/09/07
- [elpa] externals/which-key ace569b 3/8: Check for existence of buffer in which-key--popup-showing-p, Stefan Monnier, 2020/09/07
- [elpa] externals/which-key 2f56616 5/8: Version 3.3.1, Stefan Monnier, 2020/09/07
- [elpa] externals/which-key 3b184d6 6/8: Simplify finding and matching replacements, Stefan Monnier, 2020/09/07
- [elpa] externals/which-key c938bbf 2/8: Mention #130 in README, Stefan Monnier, 2020/09/07
- [elpa] externals/which-key 43e3e3d 4/8: Fix use of describe-prefix-bindings in which-key-show-standard-help,
Stefan Monnier <=
- [elpa] externals/which-key 9c5922e 8/8: Version 3.3.2, Stefan Monnier, 2020/09/07
- [elpa] externals/which-key d9122c4 7/8: Always check non-major-mode replacements in which-key--maybe-replace, Stefan Monnier, 2020/09/07