[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Sparse key maps garbage?
From: |
Stefan Monnier |
Subject: |
Re: Sparse key maps garbage? |
Date: |
Sun, 31 Aug 2008 08:55:58 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) |
>>> 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