[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/which-key da2e093 08/51: Add no-paging optional arg to
From: |
Stefan Monnier |
Subject: |
[elpa] externals/which-key da2e093 08/51: Add no-paging optional arg to which-key-show-keymap |
Date: |
Tue, 8 Sep 2020 10:26:15 -0400 (EDT) |
branch: externals/which-key
commit da2e093e916bf9ae7512c104512b92eca8fb224e
Author: Justin Burkett <justin@burkett.cc>
Commit: Justin Burkett <justin@burkett.cc>
Add no-paging optional arg to which-key-show-keymap
---
which-key.el | 32 +++++++++++++++++++-------------
1 file changed, 19 insertions(+), 13 deletions(-)
diff --git a/which-key.el b/which-key.el
index 1d3c21d..c47c576 100644
--- a/which-key.el
+++ b/which-key.el
@@ -2429,12 +2429,16 @@ Only if no bindings fit fallback to LOC2."
'which-key-keymap-history)))
;;;###autoload
-(defun which-key-show-keymap (keymap)
+(defun which-key-show-keymap (keymap &optional no-paging)
"Show the top-level bindings in KEYMAP using which-key. KEYMAP
-is selected interactively from all available keymaps."
+is selected interactively from all available keymaps.
+
+If NO-PAGING is non-nil, which-key will not intercept subsequent
+keypresses for the paging functionality."
(interactive (list (which-key--read-keymap)))
(which-key--show-keymap (symbol-name keymap)
- (symbol-value keymap)))
+ (symbol-value keymap)
+ nil nil no-paging))
;;;###autoload
(defun which-key-show-full-keymap (keymap)
@@ -2464,7 +2468,8 @@ is selected interactively by mode in
`minor-mode-map-alist'."
(which-key--show-keymap (symbol-name mode-sym)
(cdr (assq mode-sym minor-mode-map-alist)))))
-(defun which-key--show-keymap (keymap-name keymap &optional prior-args all)
+(defun which-key--show-keymap
+ (keymap-name keymap &optional prior-args all no-paging)
(when prior-args (push prior-args which-key--prior-show-keymap-args))
(let ((bindings (which-key--get-bindings nil keymap nil all)))
(if (= (length bindings) 0)
@@ -2477,15 +2482,16 @@ is selected interactively by mode in
`minor-mode-map-alist'."
(t (setq which-key--pages-obj
(which-key--create-pages bindings nil keymap-name))
(which-key--show-page)))
- (let* ((key (key-description (list (read-key))))
- (next-def (lookup-key keymap (kbd key))))
- (cond ((and which-key-use-C-h-commands (string= "C-h" key))
- (which-key-C-h-dispatch))
- ((keymapp next-def)
- (which-key--hide-popup-ignore-command)
- (which-key--show-keymap (concat keymap-name " " key) next-def
- (cons keymap-name keymap)))
- (t (which-key--hide-popup)))))))
+ (unless no-paging
+ (let* ((key (key-description (list (read-key))))
+ (next-def (lookup-key keymap (kbd key))))
+ (cond ((and which-key-use-C-h-commands (string= "C-h" key))
+ (which-key-C-h-dispatch))
+ ((keymapp next-def)
+ (which-key--hide-popup-ignore-command)
+ (which-key--show-keymap (concat keymap-name " " key) next-def
+ (cons keymap-name keymap)))
+ (t (which-key--hide-popup))))))))
(defun which-key--evil-operator-filter (binding)
(let ((def (intern (cdr binding))))
- [elpa] externals/which-key updated (9c5922e -> d794c4a), Stefan Monnier, 2020/09/08
- [elpa] externals/which-key 187ac0e 03/51: Add note to docstring for which-key-idle-delay, Stefan Monnier, 2020/09/08
- [elpa] externals/which-key c87b0ce 02/51: Add debugging messages for buffer sizing, Stefan Monnier, 2020/09/08
- [elpa] externals/which-key da2e093 08/51: Add no-paging optional arg to which-key-show-keymap,
Stefan Monnier <=
- [elpa] externals/which-key 51c485f 01/51: Don't ignore case when making replacements, Stefan Monnier, 2020/09/08
- [elpa] externals/which-key 77586e6 04/51: Add which-key-dump-bindings, Stefan Monnier, 2020/09/08
- [elpa] externals/which-key 5cbfccd 09/51: Add which-key-manual-update, Stefan Monnier, 2020/09/08
- [elpa] externals/which-key fb2bc8f 06/51: Add which-key-persistent-popup-p variable (#213), Stefan Monnier, 2020/09/08
- [elpa] externals/which-key ba03e7e 05/51: Add translation keymap support (#210), Stefan Monnier, 2020/09/08
- [elpa] externals/which-key 2cb5ceb 12/51: Fix paging in which-key-manual-update, Stefan Monnier, 2020/09/08
- [elpa] externals/which-key a256c4b 13/51: Use which-key-idle-secondary-delay value in manual updates, Stefan Monnier, 2020/09/08
- [elpa] externals/which-key a916c9a 15/51: Fix typos (#222), Stefan Monnier, 2020/09/08
- [elpa] externals/which-key 45bfcd3 22/51: Make which-key-show prefix mode-line work like top and bottom, Stefan Monnier, 2020/09/08
- [elpa] externals/which-key 1231016 29/51: More workflow fixes, Stefan Monnier, 2020/09/08