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

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

Re: unexpected result with keymap inheritance


From: Ernest Adrogué
Subject: Re: unexpected result with keymap inheritance
Date: Tue, 22 Nov 2016 01:30:15 +0100
User-agent: NeoMutt/20161014 (1.7.1)

2016-11-21, 09:12 (-0500); Stefan Monnier escriu:
> > (set-keymap-parent parent-map global-map)
> 
> Since `key-binding` checks global-map after the buffer-local map anyway,
> putting global-map as the parent of your buffer-local map has basically
> no effect.
> 
> > (define-key child-map [?a] nil)
> 
> This does not *remove* a binding from child-map.  Instead it marks the
> key as unbound, thus hiding any potential corresponding binding in
> parent keymaps.
> 
> Emacs does not provide a "remove binding" operation on keymaps.
> 
> > (key-binding [?a])
> > => self-insert-command
> 
> Here the binding was not found in the buffer-local map but in the global
> map instead.

Understood.  Thanks for clarifying this.



reply via email to

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