]> git.notmuchmail.org Git - notmuch/commitdiff
emacs: avoid binding unnamed commands in keymaps
authorJonas Bernoulli <jonas@bernoul.li>
Mon, 16 Nov 2020 21:28:42 +0000 (22:28 +0100)
committerDavid Bremner <david@tethera.net>
Sun, 6 Dec 2020 20:23:38 +0000 (16:23 -0400)
One should never bind unnamed commands in keymaps because doing that
makes it needlessly hard for users to change these bindings.

Replace such anonymous bindings with named commands that are generated
using macros and some boilerplate. Using macros is better than using a
simple loop because that makes it possible for `find-function' to find
the definitions. Eat your boilerplate--it forms character.

Admittedly this approach is quite ugly and it might be better to teach
the original commands to support different buffers directly instead of
requiring wrapper commands to do just that.

Never-the-less as a short-term solution this is better than what we
had before.


No differences found