[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [WIP PATCH] Adding keys to keymaps in alphabetical order (for use wi
From: |
Lars Ingebrigtsen |
Subject: |
Re: [WIP PATCH] Adding keys to keymaps in alphabetical order (for use with `mode-line-mode-menu') |
Date: |
Sat, 19 Jun 2021 14:31:14 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Jim Porter <jporterbugs@gmail.com> writes:
> Currently, there's not a simple way of inserting a key binding into a
> keymap in alphabetical order. This would be nice for
> `mode-line-mode-menu'; to see the issue, you can run the following:
>
> emacs -Q
> <mouse-3> ;; on the mode name in the mode-line
> ;; See the nice alphabetical list
> M-x ruler-mode
> <mouse-3> ;; on the mode name in the mode-line again
> ;; "Ruler" is first(?!)
Yup; I can reproduce this issue, too.
> I've attached a simple patch that fixes this by adding a
> `define-key-sorted' function. I imagine it still needs some work to
> handle more complex cases, but it works well enough for
> `mode-line-mode-menu'.
Hm... instead of adding a new function, perhaps it would make more
sense to just make the mode menu sort entries before displaying?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
- [WIP PATCH] Adding keys to keymaps in alphabetical order (for use with `mode-line-mode-menu'), Jim Porter, 2021/06/17
- Re: [WIP PATCH] Adding keys to keymaps in alphabetical order (for use with `mode-line-mode-menu'),
Lars Ingebrigtsen <=
- Re: [WIP PATCH] Adding keys to keymaps in alphabetical order (for use with `mode-line-mode-menu'), Jim Porter, 2021/06/21
- Re: [WIP PATCH] Adding keys to keymaps in alphabetical order (for use with `mode-line-mode-menu'), Lars Ingebrigtsen, 2021/06/21
- Re: [WIP PATCH] Adding keys to keymaps in alphabetical order (for use with `mode-line-mode-menu'), Jim Porter, 2021/06/23
- Re: [WIP PATCH] Adding keys to keymaps in alphabetical order (for use with `mode-line-mode-menu'), Lars Ingebrigtsen, 2021/06/23
- Re: [WIP PATCH] Adding keys to keymaps in alphabetical order (for use with `mode-line-mode-menu'), Stefan Monnier, 2021/06/23
- Re: [WIP PATCH] Adding keys to keymaps in alphabetical order (for use with `mode-line-mode-menu'), Lars Ingebrigtsen, 2021/06/23
- [Updated Patch] Re: [WIP PATCH] Adding keys to keymaps in alphabetical order (for use with `mode-line-mode-menu'), Jim Porter, 2021/06/23
- Re: [Updated Patch] Re: [WIP PATCH] Adding keys to keymaps in alphabetical order (for use with `mode-line-mode-menu'), Lars Ingebrigtsen, 2021/06/24