[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 4042f06 34/39: Fix prefix bindings in which-key-show-major
From: |
Justin Burkett |
Subject: |
[elpa] master 4042f06 34/39: Fix prefix bindings in which-key-show-major-mode |
Date: |
Thu, 21 Jun 2018 15:48:18 -0400 (EDT) |
branch: master
commit 4042f06564f450838c8ed79d7c0d1bce3124200d
Author: Justin Burkett <address@hidden>
Commit: Justin Burkett <address@hidden>
Fix prefix bindings in which-key-show-major-mode
---
which-key.el | 21 +++++++++++++--------
1 file changed, 13 insertions(+), 8 deletions(-)
diff --git a/which-key.el b/which-key.el
index c6b89ba..e371895 100644
--- a/which-key.el
+++ b/which-key.el
@@ -1476,16 +1476,21 @@ which are strings. KEY is of the form produced by
`key-binding'."
(intern (cdr keydesc))))
(defun which-key--map-binding-p (map keydesc)
+ "Does MAP contain KEYDESC = (key . binding)?"
(or
(when (bound-and-true-p evil-state)
- (eq (which-key--safe-lookup-key
- map
- (kbd (which-key--current-key-string
- (format "<%s-state> %s" evil-state (car keydesc)))))
- (intern (cdr keydesc))))
- (eq (which-key--safe-lookup-key
- map (kbd (which-key--current-key-string (car keydesc))))
- (intern (cdr keydesc)))))
+ (let ((lookup
+ (which-key--safe-lookup-key
+ map
+ (kbd (which-key--current-key-string
+ (format "<%s-state> %s" evil-state (car keydesc)))))))
+ (or (eq lookup (intern (cdr keydesc)))
+ (and (keymapp lookup) (string= (cdr keydesc) "Prefix Command")))))
+ (let ((lookup
+ (which-key--safe-lookup-key
+ map (kbd (which-key--current-key-string (car keydesc))))))
+ (or (eq lookup (intern (cdr keydesc)))
+ (and (keymapp lookup) (string= (cdr keydesc) "Prefix Command"))))))
(defun which-key--pseudo-key (key &optional prefix)
"Replace the last key in the sequence KEY by a special symbol
- [elpa] master 0f80d0f 17/39: Use symbol at point in whow keymap functions, (continued)
- [elpa] master 0f80d0f 17/39: Use symbol at point in whow keymap functions, Justin Burkett, 2018/06/21
- [elpa] master 61e399f 22/39: Add and use which-key--automatic-display, Justin Burkett, 2018/06/21
- [elpa] master 506c348 10/39: Add which-key-show-full-keymap, Justin Burkett, 2018/06/21
- [elpa] master d19fe4e 30/39: Fix switching to top-level from which-key-undo-key, Justin Burkett, 2018/06/21
- [elpa] master 9dc8d32 20/39: Add which-key-toggle-docstrings, Justin Burkett, 2018/06/21
- [elpa] master 206be7a 33/39: Fix behavior of f and t in evil operator map, Justin Burkett, 2018/06/21
- [elpa] master e97253b 24/39: Add prefix arg to which-key--get-current-bindings and .., Justin Burkett, 2018/06/21
- [elpa] master ded908e 25/39: Remove which-key--current-prefix, Justin Burkett, 2018/06/21
- [elpa] master 013681a 28/39: Fixes related to removal of which-key--current-prefix, Justin Burkett, 2018/06/21
- [elpa] master ff79dff 38/39: Version 3.3.0, Justin Burkett, 2018/06/21
- [elpa] master 4042f06 34/39: Fix prefix bindings in which-key-show-major-mode,
Justin Burkett <=
- [elpa] master 0dc4e84 36/39: Use window-size-change-functions for detecting size changes, Justin Burkett, 2018/06/21
- [elpa] master ab60391 21/39: Use cl-struct to hold which-key pages, Justin Burkett, 2018/06/21
- [elpa] master 0b2739a 27/39: Fix display of meta bindings in which-key-show-keymap, Justin Burkett, 2018/06/21
- [elpa] master f77d421 19/39: Consolidate key binding collection into which-key--get-bindings, Justin Burkett, 2018/06/21
- [elpa] master 4370658 29/39: Factor out which-key--this-command-keys function, Justin Burkett, 2018/06/21
- [elpa] master a4095e8 37/39: Fix handling of duplicate (evil) bindings in show keymap, Justin Burkett, 2018/06/21
- [elpa] master f251541 18/39: Refactor show keymap functions, Justin Burkett, 2018/06/21
- [elpa] master 8a878de 32/39: Version 3.2.0, Justin Burkett, 2018/06/21
- [elpa] master 2c91540 35/39: Add support for evil's auxiliary maps in show-keymap functions, Justin Burkett, 2018/06/21
- [elpa] master bc97659 31/39: Fix and improve defcustoms, Justin Burkett, 2018/06/21