Subject: bug#55301: 27.2; RFE: Auto-create defcustom for declared minor mode keymap

From: Lars Ingebrigtsen <[email-masked]>
Date: Wed, 18 May 2022 13:29:11 +0200

Robert Pluim <[email-masked]> writes:

>     Lars> But it'd be nice if a defcustom interface for keymaps existed.
>
> Something like this?
>
> (defcustom keymap-additions nil
> "Alist of bindings to add to keymaps at startup.
> Keys are keymap symbols, values are lists of conses, format
> (key-binding . command)
>
> Where KEY-BINDING is a kbd format key specification, and COMMAND is an
> Emacs command.")
>
> So you could have that be
>
> '((fundamental-mode-map . (("C-a" . mark-whole-buffer)
>                            ("C-b" . backward-word)))
>   (elisp-mode-map . (("C-a" . mark-defun))))

Yes, something like that.  But the major work would be to create a
sensible widget that allows people to customise the keymap in question.
It'd be nice if it displayed a graphical keyboard in a buffer, and you
could click on keys to specify what they should output.  😀

Or something simpler, for instance a widget where you ask the user to
enter a chord/key stroke, and then prompt what command to bind that to.
Or...  something else.  Many possibilities here.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no