diff options
| author | Lars Ingebrigtsen | 2019-07-11 16:53:43 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2019-07-11 16:53:43 +0200 |
| commit | 1c3b3206144c074ab490a5ee0ccd265d12647ad7 (patch) | |
| tree | a8e217ce1ba0fb6eb4b3a79a5f85b8c8bddcea99 /src/keymap.c | |
| parent | 9912cf376c187613e64333ff2952b5061e2986af (diff) | |
| download | emacs-1c3b3206144c074ab490a5ee0ccd265d12647ad7.tar.gz emacs-1c3b3206144c074ab490a5ee0ccd265d12647ad7.zip | |
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).
Diffstat (limited to 'src/keymap.c')
| -rw-r--r-- | src/keymap.c | 6 |
1 files changed, 4 insertions, 2 deletions
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) | |||
| 3098 | if (FIXNUMP (a->event) && !FIXNUMP (b->event)) | 3098 | if (FIXNUMP (a->event) && !FIXNUMP (b->event)) |
| 3099 | return -1; | 3099 | return -1; |
| 3100 | if (SYMBOLP (a->event) && SYMBOLP (b->event)) | 3100 | if (SYMBOLP (a->event) && SYMBOLP (b->event)) |
| 3101 | return (!NILP (Fstring_lessp (a->event, b->event)) ? -1 | 3101 | /* Sort the keystroke names in the "natural" way, with (for |
| 3102 | : !NILP (Fstring_lessp (b->event, a->event)) ? 1 | 3102 | instance) "<f2>" coming between "<f1>" and "<f11>". */ |
| 3103 | return (!NILP (Fstring_version_lessp (a->event, b->event)) ? -1 | ||
| 3104 | : !NILP (Fstring_version_lessp (b->event, a->event)) ? 1 | ||
| 3103 | : 0); | 3105 | : 0); |
| 3104 | return 0; | 3106 | return 0; |
| 3105 | } | 3107 | } |