[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/which-key 7b068f3 38/51: Fix case sorting in alpha sort
From: |
Stefan Monnier |
Subject: |
[elpa] externals/which-key 7b068f3 38/51: Fix case sorting in alpha sort functions |
Date: |
Tue, 8 Sep 2020 10:26:20 -0400 (EDT) |
branch: externals/which-key
commit 7b068f3e95a0d777cbdba92aecb6c876ccddbae5
Author: Justin Burkett <justin@burkett.cc>
Commit: Justin Burkett <justin@burkett.cc>
Fix case sorting in alpha sort functions
---
which-key-tests.el | 4 ++--
which-key.el | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/which-key-tests.el b/which-key-tests.el
index 8179797..ae015be 100644
--- a/which-key-tests.el
+++ b/which-key-tests.el
@@ -170,12 +170,12 @@
(should
(equal
(mapcar 'car (sort (copy-sequence keys) 'which-key-key-order-alpha))
- '("SPC" "a" "A" "b" "B" "p" "C-a"))))
+ '("SPC" "A" "a" "B" "b" "p" "C-a"))))
(let (which-key-sort-uppercase-first)
(should
(equal
(mapcar 'car (sort (copy-sequence keys) 'which-key-key-order-alpha))
- '("SPC" "A" "a" "B" "b" "p" "C-a"))))
+ '("SPC" "a" "A" "b" "B" "p" "C-a"))))
(let ((which-key-sort-uppercase-first t))
(should
(equal
diff --git a/which-key.el b/which-key.el
index d0a28a1..e5127ee 100644
--- a/which-key.el
+++ b/which-key.el
@@ -1321,11 +1321,11 @@ width) in lines and characters respectively."
(cond
((and alpha (not which-key-sort-uppercase-first))
(if (string-equal da db)
- (string-lessp a b)
+ (not (string-lessp a b))
(string-lessp da db)))
((and alpha which-key-sort-uppercase-first)
(if (string-equal da db)
- (not (string-lessp a b))
+ (string-lessp a b)
(string-lessp da db)))
((not which-key-sort-uppercase-first)
(let ((aup (not (string-equal da a)))
- [elpa] externals/which-key f9d8d49 39/51: Fix prefix argument for which-key-show-major-mode (#239), (continued)
- [elpa] externals/which-key f9d8d49 39/51: Fix prefix argument for which-key-show-major-mode (#239), Stefan Monnier, 2020/09/08
- [elpa] externals/which-key 8f2427a 43/51: Fix which-key--propertize-description use make-text-button return value (#249), Stefan Monnier, 2020/09/08
- [elpa] externals/which-key 90d10a8 33/51: Fix sorting of keys and add test, Stefan Monnier, 2020/09/08
- [elpa] externals/which-key 42a2505 14/51: Rework implementation of manual updating, Stefan Monnier, 2020/09/08
- [elpa] externals/which-key 0d0af8a 19/51: Strip out advice in command docstrings, Stefan Monnier, 2020/09/08
- [elpa] externals/which-key 190310d 30/51: Disable travis and cask, Stefan Monnier, 2020/09/08
- [elpa] externals/which-key a135e6f 34/51: Change name of workflow, Stefan Monnier, 2020/09/08
- [elpa] externals/which-key fcc509f 25/51: Update travis versions, Stefan Monnier, 2020/09/08
- [elpa] externals/which-key 6e4b4c5 36/51: Simplify last commit, Stefan Monnier, 2020/09/08
- [elpa] externals/which-key ce25fb2 44/51: Add basic PR template, Stefan Monnier, 2020/09/08
- [elpa] externals/which-key 7b068f3 38/51: Fix case sorting in alpha sort functions,
Stefan Monnier <=
- [elpa] externals/which-key 3401440 28/51: Fix workflow, Stefan Monnier, 2020/09/08
- [elpa] externals/which-key d5a4273 35/51: Replace use of xor, Stefan Monnier, 2020/09/08
- [elpa] externals/which-key cf44641 31/51: Replace travis badge with github workflow badge, Stefan Monnier, 2020/09/08
- [elpa] externals/which-key d1dfddc 24/51: Refactor regexp & fix incompatibility + error, Stefan Monnier, 2020/09/08
- [elpa] externals/which-key c47c72d 11/51: Cleanup whitespace in README, Stefan Monnier, 2020/09/08
- [elpa] externals/which-key 1e3640e 18/51: Make next page hint more consistent, Stefan Monnier, 2020/09/08
- [elpa] externals/which-key a66bf93 26/51: Try purcell's workflow action, Stefan Monnier, 2020/09/08
- [elpa] externals/which-key e48e190 46/51: Fix #257 (#258), Stefan Monnier, 2020/09/08