Commit 1c3b3206 authored by Lars Ingebrigtsen's avatar Lars Ingebrigtsen

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).
parent 9912cf37
Pipeline #2370 passed with stage
in 80 minutes and 7 seconds
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment