branch: master
commit c7e5f766d131cf760f181bdda780bcd63cf765cc
Merge: 6247cb5 cd8d24d
Author: Justin Burkett <[email protected]>
Commit: GitHub <[email protected]>
Merge pull request #183 from tarsiiformes/silencio
Define which-key--current-key-list before using it
---
which-key.el | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/which-key.el b/which-key.el
index d0d11a6..d28f4a2 100644
--- a/which-key.el
+++ b/which-key.el
@@ -1334,15 +1334,6 @@ local bindings coming first. Within these categories
order using
(defsubst which-key--butlast-string (str)
(mapconcat #'identity (butlast (split-string str)) " "))
-(defun which-key--pseudo-key (key &optional use-current-prefix)
- "Replace the last key in the sequence KEY by a special symbol
-in order for which-key to allow looking up a description for the key."
- (let* ((seq (listify-key-sequence key))
- (final (intern (format "which-key-%s" (key-description (last seq))))))
- (if use-current-prefix
- (vconcat (which-key--current-key-list) (list final))
- (vconcat (butlast seq) (list final)))))
-
(defun which-key--get-replacements (key-binding &optional use-major-mode)
(let ((alist (or (and use-major-mode
(cdr-safe
@@ -1422,6 +1413,15 @@ which are strings. KEY is of the form produced by
`key-binding'."
map (kbd (which-key--current-key-string (car keydesc))))
(intern (cdr keydesc)))))
+(defun which-key--pseudo-key (key &optional use-current-prefix)
+ "Replace the last key in the sequence KEY by a special symbol
+in order for which-key to allow looking up a description for the key."
+ (let* ((seq (listify-key-sequence key))
+ (final (intern (format "which-key-%s" (key-description (last seq))))))
+ (if use-current-prefix
+ (vconcat (which-key--current-key-list) (list final))
+ (vconcat (butlast seq) (list final)))))
+
(defun which-key--maybe-get-prefix-title (keys)
"KEYS is a string produced by `key-description'.
A title is possibly returned using