[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/which-key 27d9fec 32/32: Fix compiler warnings
From: |
ELPA Syncer |
Subject: |
[elpa] externals/which-key 27d9fec 32/32: Fix compiler warnings |
Date: |
Wed, 30 Jun 2021 18:57:32 -0400 (EDT) |
branch: externals/which-key
commit 27d9fec33abb989b030f7677ccf5f799287d6472
Author: Justin Burkett <justin@burkett.cc>
Commit: Justin Burkett <justin@burkett.cc>
Fix compiler warnings
Fixes #312
---
which-key.el | 24 +++++++++++++-----------
1 file changed, 13 insertions(+), 11 deletions(-)
diff --git a/which-key.el b/which-key.el
index 1213d14..ff0db27 100644
--- a/which-key.el
+++ b/which-key.el
@@ -717,9 +717,20 @@ update.")
(goto-char (point-max))
(insert "\n" fmt-msg "\n")))))
+(defsubst which-key--safe-lookup-key (keymap key)
+ "Version of `lookup-key' that allows KEYMAP to be nil.
+Also convert numeric results of `lookup-key' to nil. KEY is not
+checked."
+ (when (keymapp keymap)
+ (let ((result (lookup-key keymap key)))
+ (when (and result (not (numberp result)))
+ result))))
+
;;; Third-party library support
;;;; Evil
+(defvar evil-state nil)
+
(defcustom which-key-allow-evil-operators (boundp 'evil-this-operator)
"Allow popup to show for evil operators.
The popup is normally inhibited in the middle of commands, but
@@ -1440,15 +1451,6 @@ local bindings coming first. Within these categories
order using
"If MAYBE-STRING is a string use `which-key--string-width' o/w return 0."
(if (stringp maybe-string) (string-width maybe-string) 0))
-(defsubst which-key--safe-lookup-key (keymap key)
- "Version of `lookup-key' that allows KEYMAP to be nil.
-Also convert numeric results of `lookup-key' to nil. KEY is not
-checked."
- (when (keymapp keymap)
- (let ((result (lookup-key keymap key)))
- (when (and result (not (numberp result)))
- result))))
-
(defsubst which-key--butlast-string (str)
(mapconcat #'identity (butlast (split-string str)) " "))
@@ -1702,7 +1704,7 @@ return the docstring."
(t
(format "%s %s" current docstring)))))
-(defun which-key--format-and-replace (unformatted &optional prefix
preserve-full-key)
+(defun which-key--format-and-replace (unformatted &optional preserve-full-key)
"Take a list of (key . desc) cons cells in UNFORMATTED, add
faces and perform replacements according to the three replacement
alists. Returns a list (key separator description)."
@@ -1851,7 +1853,7 @@ non-nil, then bindings are collected recursively for all
prefixes."
(when which-key-sort-order
(setq unformatted
(sort unformatted which-key-sort-order)))
- (which-key--format-and-replace unformatted prefix recursive)))
+ (which-key--format-and-replace unformatted recursive)))
;;; Functions for laying out which-key buffer pages
- [elpa] externals/which-key fffd3e5 07/32: Fix default of which-key-replacement-alist, (continued)
- [elpa] externals/which-key fffd3e5 07/32: Fix default of which-key-replacement-alist, ELPA Syncer, 2021/06/30
- [elpa] externals/which-key 8d6d81d 09/32: Expand get-keymap-bindings test, ELPA Syncer, 2021/06/30
- [elpa] externals/which-key 6290c9e 26/32: Improve which-key-add-keymap-based-bindings, ELPA Syncer, 2021/06/30
- [elpa] externals/which-key 063b867 18/32: Fix github action, ELPA Syncer, 2021/06/30
- [elpa] externals/which-key 28f386c 25/32: Fix key sort order functions, ELPA Syncer, 2021/06/30
- [elpa] externals/which-key 11471fb 21/32: Add install python step to github action, ELPA Syncer, 2021/06/30
- [elpa] externals/which-key e236920 14/32: Merge branch 'alt-get-bindings', ELPA Syncer, 2021/06/30
- [elpa] externals/which-key 7cfbf8c 23/32: Turn off fail-fast in github action, ELPA Syncer, 2021/06/30
- [elpa] externals/which-key eb5a2e3 28/32: Clean up some docstrings, ELPA Syncer, 2021/06/30
- [elpa] externals/which-key cd0c48c 29/32: Clarify usage of keymap replacements in docstrings and README, ELPA Syncer, 2021/06/30
- [elpa] externals/which-key 27d9fec 32/32: Fix compiler warnings,
ELPA Syncer <=
- [elpa] externals/which-key 4c27fc0 30/32: Improve which-key-add-keymap-based-replacements., ELPA Syncer, 2021/06/30
- [elpa] externals/which-key 8a558e6 06/32: Update tests, ELPA Syncer, 2021/06/30
- [elpa] externals/which-key e42d946 11/32: Fix prefix sorting, ELPA Syncer, 2021/06/30
- [elpa] externals/which-key fc88551 05/32: Remove pseudo binding stuff, ELPA Syncer, 2021/06/30
- [elpa] externals/which-key 465d2fb 10/32: Fix add-keymap-based-bindings and associated test, ELPA Syncer, 2021/06/30
- [elpa] externals/which-key 6ae80f5 22/32: Try without cask, ELPA Syncer, 2021/06/30
- [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