emacs-elpa-diffs
[Top][All Lists]
Advanced

[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)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]