[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 1c3b320: Tweak the order keystrokes are sorted in k
From: |
Lars Ingebrigtsen |
Subject: |
[Emacs-diffs] master 1c3b320: Tweak the order keystrokes are sorted in keymap listings |
Date: |
Thu, 11 Jul 2019 10:54:35 -0400 (EDT) |
branch: master
commit 1c3b3206144c074ab490a5ee0ccd265d12647ad7
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>
Tweak the order keystrokes are sorted in keymap listings
* src/keymap.c (describe_map_compare): Change the sorting order of
keystrokes, so that we get the order <f1> <f2> <f11> instead of
<f1> <f11> <f2> (bug#33237).
---
src/keymap.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/keymap.c b/src/keymap.c
index 2ac3d33..fc04c56 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -3098,8 +3098,10 @@ describe_map_compare (const void *aa, const void *bb)
if (FIXNUMP (a->event) && !FIXNUMP (b->event))
return -1;
if (SYMBOLP (a->event) && SYMBOLP (b->event))
- return (!NILP (Fstring_lessp (a->event, b->event)) ? -1
- : !NILP (Fstring_lessp (b->event, a->event)) ? 1
+ /* Sort the keystroke names in the "natural" way, with (for
+ instance) "<f2>" coming between "<f1>" and "<f11>". */
+ return (!NILP (Fstring_version_lessp (a->event, b->event)) ? -1
+ : !NILP (Fstring_version_lessp (b->event, a->event)) ? 1
: 0);
return 0;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 1c3b320: Tweak the order keystrokes are sorted in keymap listings,
Lars Ingebrigtsen <=