diff --git a/src/keymap.c b/src/keymap.c index 2ac3d33460c..fc04c565a1e 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) "" coming between "" and "". */ + return (!NILP (Fstring_version_lessp (a->event, b->event)) ? -1 + : !NILP (Fstring_version_lessp (b->event, a->event)) ? 1 : 0); return 0; }