emacs-devel
[Top][All Lists]
Advanced

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

Re: possibly spurious bytecomp warning:


From: Michael Heerdegen
Subject: Re: possibly spurious bytecomp warning:
Date: Sun, 21 May 2023 02:44:27 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

"T.V Raman" <raman@google.com> writes:

> re define-key -- not sure how I would use that to remove a keybinding.

> In my usage  I wanted to unbind the keys in the eww link map which gets
> applied as a  keymap property -- since it was shadowing a binding that I
> wanted everywhere in the EWW buffer.

`define-key' to nil should be good enough - AFAIR, a nil entry doesn't
shadow other keymaps.

`define-key' also has an optional REMOVE argument that actually removes
the binding and (see docstring) "makes a difference if the KEYMAP has a
parent, and KEY is shadowing the same binding in the parent.  With
REMOVE, subsequent lookups will return the binding in the parent, and
with a nil DEF, the lookups will return nil."  So this is only necessary
when your keymap has a parent.

Oh, and now there is also the new `keymap-unset' with a slightly different
interface.

Michael.



reply via email to

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