emacs-devel
[Top][All Lists]
Advanced

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

Re: Generalizing make-composed-keymap


From: Clément Pit--Claudel
Subject: Re: Generalizing make-composed-keymap
Date: Wed, 15 Jun 2016 11:34:54 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0

On 2016-06-15 11:23, Stefan Monnier wrote:
> BTW, currently make-composed-keymap takes a list of maps as argument,
> but I'm beginning to think it would make sense to also accept (KEY
> . CMD) elements in that list, so that we can just say
> 
>     (make-composed-keymap
>      '((" " my-space-replacement)
>        ("?" nil))                ; Just hide the old ? binding.
>      my-parent-map)
> 
> instead of
> 
>     (let ((map (make-sparse-keymap)))
>       (set-keymap-parent map my-parent-map)
>       (define-key map " " 'my-space-replacement)
>       (define-key map "?" nil)
>       map)
> 
> WDYT?

What about adding a `parent' option to make-sparse-keymap instead? That could 
help with discoverability.


Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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