[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: |
Kim F. Storm |
Subject: |
Re: C-h k, C-h f and keyboard macros: Patch. |
Date: |
11 Feb 2003 15:13:47 +0100 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 |
Juanma Barranquero <address@hidden> writes:
>
> Trying it, though, has unveiled a bug with local keymaps and
> `lookup-key':
> ELISP> (remap-command [home])
*** Eval error *** Key sequence contains invalid event
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).
This reveals that key-binding only validates as much of the key
sequence as is matched by the active keymaps, but I consider that a
minor issue.
The problem I can see is that remap-command expects a SYMBOL as the
argument. All callers in C checks for this, but from Lisp, there is
no such check. I'll add one.
So
> ELISP> (cua-mode 1)
> ELISP> (remap-command [home])
should have failed with a "wrong type argument" error.
But how was this related to the C-h k macro patch??
--
Kim F. Storm <address@hidden> http://www.cua.dk
- C-h k, C-h f and keyboard macros: Patch., Luc Teirlinck, 2003/02/10
- Re: C-h k, C-h f and keyboard macros: Patch., Kim F. Storm, 2003/02/11
- Re: C-h k, C-h f and keyboard macros: Patch., Juanma Barranquero, 2003/02/11
- Re: C-h k, C-h f and keyboard macros: Patch.,
Kim F. Storm <=
- Re: C-h k, C-h f and keyboard macros: Patch., Juanma Barranquero, 2003/02/11
- Re: C-h k, C-h f and keyboard macros: Patch., Kim F. Storm, 2003/02/11
- Re: C-h k, C-h f and keyboard macros: Patch., Juanma Barranquero, 2003/02/11
- Re: C-h k, C-h f and keyboard macros: Patch., Kim F. Storm, 2003/02/11
- Re: C-h k, C-h f and keyboard macros: Patch., Juanma Barranquero, 2003/02/11
- Re: C-h k, C-h f and keyboard macros: Patch., Stefan Monnier, 2003/02/11
- Re: C-h k, C-h f and keyboard macros: Patch., Kim F. Storm, 2003/02/11
- Re: C-h k, C-h f and keyboard macros: Patch., Richard Stallman, 2003/02/12
- Re: C-h k, C-h f and keyboard macros: Patch., Kim F. Storm, 2003/02/12
Re: C-h k, C-h f and keyboard macros: Patch., Luc Teirlinck, 2003/02/11