From: Jonas Bernoulli Date: Mon, 16 Nov 2020 21:28:42 +0000 (+0100) Subject: emacs: avoid binding unnamed commands in keymaps X-Git-Tag: 0.32_rc0~176 X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=adfded9ed0a5a4b06886f462314cd4511cb72d47;hp=adfded9ed0a5a4b06886f462314cd4511cb72d47;p=notmuch emacs: avoid binding unnamed commands in keymaps 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. ---