From: Michael Heerdegen <michael_heerdegen@web.de>
To: "T.V Raman" <raman@google.com>
Cc: rtt@dasyatidae.com, emacs-devel@gnu.org
Subject: Re: possibly spurious bytecomp warning:
Date: Sun, 21 May 2023 02:44:27 +0200 [thread overview]
Message-ID: <878rdicy38.fsf@web.de> (raw)
In-Reply-To: <p91a5xyzto8.fsf@google.com> (T. V. Raman's message of "Sat, 20 May 2023 12:31:19 -0700")
"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.
next prev parent reply other threads:[~2023-05-21 0:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-19 20:48 possibly spurious bytecomp warning: T.V Raman
2023-05-19 22:19 ` Michael Heerdegen
2023-05-19 23:36 ` Robin Tarsiger
2023-05-20 0:26 ` Michael Heerdegen
2023-05-20 1:47 ` T.V Raman
2023-05-20 2:03 ` Michael Heerdegen
2023-05-20 19:31 ` T.V Raman
2023-05-21 0:44 ` Michael Heerdegen [this message]
2023-05-21 2:03 ` T.V Raman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=878rdicy38.fsf@web.de \
--to=michael_heerdegen@web.de \
--cc=emacs-devel@gnu.org \
--cc=raman@google.com \
--cc=rtt@dasyatidae.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).