[Top][All Lists]

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

Re: C-h k, C-h f and keyboard macros: Patch.

From: Stefan Monnier
Subject: Re: C-h k, C-h f and keyboard macros: Patch.
Date: Tue, 11 Feb 2003 11:19:03 -0500

> The call `(remap-command COMMAND)' is equivalent to
> the call `(key-binding [remap COMMAND] nil t)', so in your case,
> you are trying to run (key-binding [remap [home]] nil t)
> which correctly reports a "Key sequence contains invalid event"
> error (but only when there are any remap entries in one of the
> active keymaps -- as there are when you enable cua-mode).

I think it shouldn't report an error but just return nil.
Checking that events are "meaningful" might be OK for define-key but
doesn't make any sense for lookup-key and friends.
If you look at the test used currently, it is already more lax in
lookup-key than in define-key (justified by the following comment:)

      /* Allow string since binding for `menu-bar-select-buffer'
         includes the buffer name in the key sequence.  */

I suggest we just get rid of the checks in lookup-key.


reply via email to

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