emacs-elpa-diffs
[Top][All Lists]
Advanced

[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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]