[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 6a4d2c2 09/39: Extract which-key--ignore-keys-regexp and w
From: |
Justin Burkett |
Subject: |
[elpa] master 6a4d2c2 09/39: Extract which-key--ignore-keys-regexp and which-key-show-keymap-1 |
Date: |
Thu, 21 Jun 2018 15:48:13 -0400 (EDT) |
branch: master
commit 6a4d2c2cc0e240cae1a4bb3526c3aab2d47665af
Author: Justin Burkett <address@hidden>
Commit: Justin Burkett <address@hidden>
Extract which-key--ignore-keys-regexp and which-key-show-keymap-1
---
which-key.el | 26 +++++++++++++++-----------
1 file changed, 15 insertions(+), 11 deletions(-)
diff --git a/which-key.el b/which-key.el
index 89c0468..68c5d0e 100644
--- a/which-key.el
+++ b/which-key.el
@@ -654,6 +654,11 @@ used.")
(defvar which-key--previous-frame-size nil)
(defvar which-key--prefix-title-alist nil)
(defvar which-key--debug nil)
+(defvar which-key--ignore-keys-regexp
+ (eval-when-compile
+ (regexp-opt '("mouse-" "wheel-" "remap" "drag-" "scroll-bar"
+ "select-window" "switch-frame" "-state"
+ "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")
@@ -1677,11 +1682,6 @@ Requires `which-key-compute-remaps' to be non-nil"
(buffer (current-buffer))
(ignore-bindings '("self-insert-command" "ignore"
"ignore-event" "company-ignore"))
- (ignore-keys-regexp
- (eval-when-compile
- (regexp-opt '("mouse-" "wheel-" "remap" "drag-" "scroll-bar"
- "select-window" "switch-frame" "-state"
- "which-key-"))))
(ignore-sections-regexp
(eval-when-compile
(regexp-opt '("Key translations" "Function key map translations"
@@ -1719,7 +1719,7 @@ Requires `which-key-compute-remaps' to be non-nil"
(save-match-data
(cond
((member binding ignore-bindings))
- ((string-match-p ignore-keys-regexp key))
+ ((string-match-p which-key--ignore-keys-regexp key))
((and which-key--current-prefix
(string-match (format "^%s[ \t]\\([^ \t]+\\)[ \t]+$"
key-str-qt) key))
@@ -2276,10 +2276,7 @@ Only if no keys fit fallback to LOC2."
(which-key--show-page page-n)
loc2))))
-(defun which-key-show-keymap ()
- "Show the top-level bindings in KEYMAP using which-key. KEYMAP
-is selected interactively from all available keymaps."
- (interactive)
+(defun which-key-show-keymap-1 (&optional all)
(let ((keymap-sym (intern
(completing-read
"Keymap: " obarray
@@ -2290,7 +2287,14 @@ is selected interactively from all available keymaps."
(make-sparse-keymap)))))
t nil 'which-key-keymap-history))))
(which-key--show-keymap (symbol-name keymap-sym)
- (symbol-value keymap-sym))))
+ (symbol-value keymap-sym)
+ nil all)))
+
+(defun which-key-show-keymap ()
+ "Show the top-level bindings in KEYMAP using which-key. KEYMAP
+is selected interactively from all available keymaps."
+ (interactive)
+ (which-key-show-keymap-1))
(defun which-key-show-minor-mode-keymap ()
"Show the top-level bindings in KEYMAP using which-key. KEYMAP
- [elpa] master updated (81c4a3d -> fb09d75), Justin Burkett, 2018/06/21
- [elpa] master 1dd91df 01/39: Implement #182, Justin Burkett, 2018/06/21
- [elpa] master 1219622 02/39: Remove debugging message, Justin Burkett, 2018/06/21
- [elpa] master c71fbbb 03/39: Add option to show docstrings in which-key buffer, Justin Burkett, 2018/06/21
- [elpa] master fce520f 08/39: Improve which-key--format-and-replace, Justin Burkett, 2018/06/21
- [elpa] master caa18b2 12/39: Fix descriptions of keys involving meta when showing keymaps, Justin Burkett, 2018/06/21
- [elpa] master e5db4b6 07/39: Handle null description in which-key--propertize-description, Justin Burkett, 2018/06/21
- [elpa] master 0aae4c8 04/39: Improve which-key-show-docstrings option, Justin Burkett, 2018/06/21
- [elpa] master 6a4d2c2 09/39: Extract which-key--ignore-keys-regexp and which-key-show-keymap-1,
Justin Burkett <=
- [elpa] master ca991b0 11/39: Autoload the show keymap functions, Justin Burkett, 2018/06/21
- [elpa] master fd714bc 13/39: Fix docstring of which-key--get-keymap-bindings, Justin Burkett, 2018/06/21
- [elpa] master b5f7063 15/39: Detect menu-items in which-key--get-keymap-bindings, Justin Burkett, 2018/06/21
- [elpa] master 5493d22 05/39: Fix description truncation when showing docstrings, Justin Burkett, 2018/06/21
- [elpa] master 2e53187 14/39: Fix typo in previous commit, Justin Burkett, 2018/06/21
- [elpa] master 7da9f8c 16/39: Fix which-key--show-keymap when no bidnings found, Justin Burkett, 2018/06/21
- [elpa] master 3c05294 26/39: Fix which-key--create-pages, Justin Burkett, 2018/06/21
- [elpa] master adc0d66 06/39: Use safe version of propertize, Justin Burkett, 2018/06/21
- [elpa] master 0f80d0f 17/39: Use symbol at point in whow keymap functions, Justin Burkett, 2018/06/21
- [elpa] master 61e399f 22/39: Add and use which-key--automatic-display, Justin Burkett, 2018/06/21