[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/which-key 3908719 7/9: simplify pseudo key
From: |
Stefan Monnier |
Subject: |
[elpa] externals/which-key 3908719 7/9: simplify pseudo key |
Date: |
Mon, 15 Mar 2021 22:29:20 -0400 (EDT) |
branch: externals/which-key
commit 3908719ff2cf45ef886fa484af0cf8a81e95c9aa
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
simplify pseudo key
---
which-key.el | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/which-key.el b/which-key.el
index de1aa67..b2635ea 100644
--- a/which-key.el
+++ b/which-key.el
@@ -677,12 +677,12 @@ update.")
(defvar which-key--ignore-non-evil-keys-regexp
(eval-when-compile
(regexp-opt '("mouse-" "wheel-" "remap" "drag-" "scroll-bar"
- "select-window" "switch-frame" "which-key-"))))
+ "select-window" "switch-frame" "which-key"))))
(defvar which-key--ignore-keys-regexp
(eval-when-compile
(regexp-opt '("mouse-" "wheel-" "remap" "drag-" "scroll-bar"
"select-window" "switch-frame" "-state"
- "which-key-"))))
+ "which-key"))))
(make-obsolete-variable 'which-key-prefix-name-alist nil "2016-10-05")
(make-obsolete-variable 'which-key-prefix-title-alist nil "2016-10-05")
@@ -1595,11 +1595,8 @@ which are strings. KEY is of the form produced by
`key-binding'."
(defun which-key--pseudo-key (key &optional 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 prefix
- (vconcat prefix (list final))
- (vconcat (butlast seq) (list final)))))
+ (let ((seq (listify-key-sequence key)))
+ (vconcat (or prefix (butlast seq)) (vector 'which-key (last seq)))))
(defun which-key--maybe-get-prefix-title (keys)
"KEYS is a string produced by `key-description'.
- [elpa] externals/which-key updated (d794c4a -> c0608e8), Stefan Monnier, 2021/03/15
- [elpa] externals/which-key ae59b7e 3/9: Version 3.5.0, Stefan Monnier, 2021/03/15
- [elpa] externals/which-key 427c3f4 4/9: Clarify README's description of keymap-based replacement, Stefan Monnier, 2021/03/15
- [elpa] externals/which-key a70fc16 1/9: Hide paging hint when prefix is help-char, Stefan Monnier, 2021/03/15
- [elpa] externals/which-key ca268fd 6/9: REAMDE code's Number of parentheses pairs (#270), Stefan Monnier, 2021/03/15
- [elpa] externals/which-key c0608e8 9/9: Version 3.5.1, Stefan Monnier, 2021/03/15
- [elpa] externals/which-key 5b37abc 2/9: Fix which-key--next-page-hint, Stefan Monnier, 2021/03/15
- [elpa] externals/which-key c011b26 5/9: Add tests for keymap-based-bindings, Stefan Monnier, 2021/03/15
- [elpa] externals/which-key 3908719 7/9: simplify pseudo key,
Stefan Monnier <=
- [elpa] externals/which-key 428aedf 8/9: Further simplify which-key--pseudo-key, Stefan Monnier, 2021/03/15