[Top][All Lists]

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

Re: Function for deleting a key binding in a sparse keymap

From: Lennart Borgman
Subject: Re: Function for deleting a key binding in a sparse keymap
Date: Wed, 07 Dec 2005 00:01:30 +0100
User-agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)

Stefan Monnier wrote:

The next time I enter that minor mode the key definitions outside may
however be different so I want to remove the key bindings I added when
exiting the minor mode.
Why not set them to nil?
They should have the default value in those cases.  A workaround is of
course to set them to the default value.

What default value?  Please, make your concrete example concrete.

I feel a bit stupid because this example is not terribly important. However this is what I do. There is a minor mode where I use this, bw-window-resize-mode. When entering this mode I do:

       (mapc (lambda(key)
               (define-key bw-keymap (vector key) nil))

I set the "help keys" to nil so that the help is still available during resizing. Those are the keys I want to remove afterwards. The default value in the sparse keymap bw-keymap is:

      (define-key bw-keymap [t]  'bw-exit-resize-mode)

Since Richard just decided that this part of the window resizing is new and therefore should not go with our next release it is of less importance now. However I do believe that it still would be good to add that function (see subject line) now.

reply via email to

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