[neomutt-devel] Function Renaming
Richard Russon
rich at flatcap.org
Thu Jun 11 12:44:15 CEST 2026
Recently, @alonaoum posted their keybindings for NeoMutt.
Not a few keys here or there, a complete wipe and start over.
It's LONG read, but it raised a lot of questions about functions.
Notably, how inconsistently-named they were.
- A more consistent key binding scheme (LONG)
https://github.com/neomutt/neomutt/discussions/4884
- Renaming Functions (some concrete ideas)
https://github.com/neomutt/neomutt/discussions/4889
- Functions Refactoring (PR)
https://github.com/neomutt/neomutt/pull/4899
If *you* have ideas, let me know.
---
This has all been made possible by my menu-refactoring work a few months ago.
- ae6b9fe0c merge: Use MenuDefinition rather than MENU_*
The old key-handling code used hard-coded tables of functions.
In the new code, small SubMenus (sets of functions) can be combined and reused.
The Dialogs create their Menus from SubMenus and pass them to the key-handling code.
The key code is now MUCH simpler -- no hard-coding, no magic rules.
The SubMenu reuse has allowed me to streamline the Menus.
Most notably, in the PR, OpPager.
OpPager is the list of functions supported by the Pager.
In `main` it contains 124 functions.
Most of those are Index functions that it delegates.
A load more are other 'generic' functions.
OpPager now contains 4 functions -- That's it.
The Pager only has four unique actions.
---
This is just one of the large number of refactorings that I've done recently.
I'd tell you about them all, but that takes a lot of time and I tend to get zero
feedback when I do.
If you want to know more about NeoMutt's technical improvements, then please engage.
Thanks for reading to the end!
Cheers,
FlatCap / Rich
--
Become a sponsor of NeoMutt - https://neomutt.org/sponsor
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://mailman.neomutt.org/pipermail/neomutt-devel-neomutt.org/attachments/20260611/18a3bec9/attachment.sig>
More information about the neomutt-devel
mailing list