bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Lars Ingebrigtsen
Subject: bug#55301: 27.2; RFE: Auto-create defcustom for declared minor mode keymap
Date: Wed, 18 May 2022 13:29:11 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Robert Pluim <rpluim@gmail.com> 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]