[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master cd8d24d 17/21: Define which-key--current-key-list before u
From: |
Justin Burkett |
Subject: |
[elpa] master cd8d24d 17/21: Define which-key--current-key-list before using it |
Date: |
Mon, 8 Jan 2018 22:46:57 -0500 (EST) |
branch: master
commit cd8d24d02479d510e20a2854f23a770fa9c9516f
Author: Jonas Bernoulli <address@hidden>
Commit: Jonas Bernoulli <address@hidden>
Define which-key--current-key-list before using it
Actually move the definition of the caller which-key--pseudo-key
instead.
---
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
- [elpa] master 3ff8f48 10/21: Allow null DEF in which-key--process-define-key-args, (continued)
- [elpa] master 3ff8f48 10/21: Allow null DEF in which-key--process-define-key-args, Justin Burkett, 2018/01/08
- [elpa] master 555c5c1 13/21: Demote errors in which-key--process-define-key-args, Justin Burkett, 2018/01/08
- [elpa] master 0a212c7 11/21: Fix travis build, Justin Burkett, 2018/01/08
- [elpa] master c7e5f76 18/21: Merge pull request #183 from tarsiiformes/silencio, Justin Burkett, 2018/01/08
- [elpa] master 6247cb5 16/21: Simplify implementation of define-key based replacements, Justin Burkett, 2018/01/08
- [elpa] master 1694c6d 15/21: Improve which-key--process-define-key-args, Justin Burkett, 2018/01/08
- [elpa] master b6d04b3 12/21: Fix .travis.yml, Justin Burkett, 2018/01/08
- [elpa] master 7150aa9 14/21: Announce which-key-enable-extended-define-key in README, Justin Burkett, 2018/01/08
- [elpa] master 7559a79 20/21: Version 3.1.0, Justin Burkett, 2018/01/08
- [elpa] master ef384e7 19/21: Fix and improve define-key based replacements, Justin Burkett, 2018/01/08
- [elpa] master cd8d24d 17/21: Define which-key--current-key-list before using it,
Justin Burkett <=
- [elpa] master 1234342 06/21: Re-indent README, Justin Burkett, 2018/01/08
- [elpa] master 56b0fc8 21/21: Merge commit '7559a79e95aada65601f7413a1c3f08bfa34557b', Justin Burkett, 2018/01/08