unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: "Lennart Borgman \(gmail\)" <lennart.borgman@gmail.com>
Cc: Emacs Devel <emacs-devel@gnu.org>
Subject: Re: Sparse key maps garbage?
Date: Sun, 31 Aug 2008 08:55:58 -0400	[thread overview]
Message-ID: <jwvwshx1h0r.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <48BA8BE1.7010006@gmail.com> (Lennart Borgman's message of "Sun,  31 Aug 2008 14:17:37 +0200")

>>> If you do
>> 
>>> (defvar my-sparse-map (make-sparse-keymap))
>>> (define-key my-sparse-map [f4] nil)
>> 
>>> then there will be an entry with f4 in my-sparse-keymap. I do not think
>>> that is used for anything. Is it? Should it be there?
>> 
>> Actually, IIRC it's (been) used at some places to create a place holder
>> in the keymap which is later on replaced with the actual binding.
>> But I do wonder why you care,

> I was looking a bit at how to undefine a key, for example at
> local-unset-key. So what I really wondered was how do you undefine a
> key? Is there a standard way to do that?

Depends how you define "un define a key".  Binding it to nil is such
a way.  Binding it to `undefined' is another.  Removing the binding from
the keymap is yet another (one that does not come with a ready-to-use
function for it).


        Stefan




  reply	other threads:[~2008-08-31 12:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-30 23:44 Sparse key maps garbage? Lennart Borgman (gmail)
2008-08-31  6:18 ` Stefan Monnier
2008-08-31 12:17   ` Lennart Borgman (gmail)
2008-08-31 12:55     ` Stefan Monnier [this message]
2008-08-31 13:05       ` Lennart Borgman (gmail)
2008-08-31 18:19         ` Stefan Monnier
2008-08-31 20:09           ` Lennart Borgman (gmail)
2008-09-01  3:00             ` Stefan Monnier
2008-09-01  7:34               ` Lennart Borgman (gmail)
2008-09-01 18:25                 ` Stefan Monnier
2008-09-01 22:28                   ` Lennart Borgman (gmail)

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=jwvwshx1h0r.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=lennart.borgman@gmail.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).