[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/which-key b83c0de 27/32: Clean up which-key--maybe-repl
From: |
ELPA Syncer |
Subject: |
[elpa] externals/which-key b83c0de 27/32: Clean up which-key--maybe-replace |
Date: |
Wed, 30 Jun 2021 18:57:31 -0400 (EDT) |
branch: externals/which-key
commit b83c0deca652ee3d42c1501dd09416b2505304b7
Author: Justin Burkett <justin@burkett.cc>
Commit: Justin Burkett <justin@burkett.cc>
Clean up which-key--maybe-replace
---
which-key.el | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/which-key.el b/which-key.el
index 2bfbb39..9a2883d 100644
--- a/which-key.el
+++ b/which-key.el
@@ -1506,7 +1506,7 @@ local bindings coming first. Within these categories
order using
(setq key-binding (which-key--replace-in-binding key-binding repl))))
(when found `(replaced . ,key-binding))))
-(defun which-key--maybe-replace (key-binding &optional prefix)
+(defun which-key--maybe-replace (key-binding)
"Use `which-key--replacement-alist' to maybe replace KEY-BINDING.
KEY-BINDING is a cons cell of the form \(KEY . BINDING\) each of
which are strings. KEY is of the form produced by `key-binding'."
@@ -1721,17 +1721,13 @@ alists. Returns a list (key separator description)."
(local-map (current-local-map))
new-list)
(dolist (key-binding unformatted)
- (let* ((key (car key-binding))
+ (let* ((keys (car key-binding))
(orig-desc (cdr key-binding))
(group (which-key--group-p orig-desc))
- ;; At top-level prefix is nil
- (keys (if prefix
- (concat (key-description prefix) " " key)
- key))
(local (eq (which-key--safe-lookup-key local-map (kbd keys))
(intern orig-desc)))
(hl-face (which-key--highlight-face orig-desc))
- (key-binding (which-key--maybe-replace (cons keys orig-desc)
prefix))
+ (key-binding (which-key--maybe-replace key-binding))
(final-desc (which-key--propertize-description
(cdr key-binding) group local hl-face orig-desc)))
(when final-desc
- [elpa] externals/which-key d621634 19/32: Try with cask again, (continued)
- [elpa] externals/which-key d621634 19/32: Try with cask again, ELPA Syncer, 2021/06/30
- [elpa] externals/which-key a55b908 04/32: Alternative approach to retrieving bindings (WIP), ELPA Syncer, 2021/06/30
- [elpa] externals/which-key 1f9c37d 03/32: Merge pull request #305 from tarsiiformes/first-line, ELPA Syncer, 2021/06/30
- [elpa] externals/which-key 4e592ed 08/32: Fix type usage and arglists for new functions, ELPA Syncer, 2021/06/30
- [elpa] externals/which-key d6b56f3 13/32: Fix detection of named prefix bindings, ELPA Syncer, 2021/06/30
- [elpa] externals/which-key 2444833 12/32: Fix menu-item bidning retrieval, ELPA Syncer, 2021/06/30
- [elpa] externals/which-key 7d344ce 17/32: Fix test, ELPA Syncer, 2021/06/30
- [elpa] externals/which-key 300c098 16/32: Update README, ELPA Syncer, 2021/06/30
- [elpa] externals/which-key 3f76f51 20/32: Fix which-key--group-p, ELPA Syncer, 2021/06/30
- [elpa] externals/which-key 8b707ef 15/32: Make enable-extended-define-key obsolete, ELPA Syncer, 2021/06/30
- [elpa] externals/which-key b83c0de 27/32: Clean up which-key--maybe-replace,
ELPA Syncer <=
- [elpa] externals/which-key 7abe54f 31/32: Handle closure definition type, ELPA Syncer, 2021/06/30