unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: storm@cua.dk (Kim F. Storm)
Cc: emacs-devel@gnu.org
Subject: Re: C-h k, C-h f and keyboard macros: Patch.
Date: 11 Feb 2003 15:13:47 +0100	[thread overview]
Message-ID: <5xisvqvrac.fsf@kfs2.cua.dk> (raw)
In-Reply-To: <20030211134619.B425.LEKTU@terra.es>

Juanma Barranquero <lektu@terra.es> 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 <storm@cua.dk> http://www.cua.dk

  reply	other threads:[~2003-02-11 14:13 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-10 23:56 C-h k, C-h f and keyboard macros: Patch Luc Teirlinck
2003-02-11 13:10 ` Kim F. Storm
2003-02-11 12:52   ` Juanma Barranquero
2003-02-11 14:13     ` Kim F. Storm [this message]
2003-02-11 14:07       ` Juanma Barranquero
2003-02-11 15:18         ` Kim F. Storm
2003-02-11 14:27           ` Juanma Barranquero
2003-02-11 15:36           ` Kim F. Storm
2003-02-11 14:47             ` Juanma Barranquero
2003-02-11 16:19       ` Stefan Monnier
2003-02-11 20:58         ` Kim F. Storm
2003-02-12 20:34         ` Richard Stallman
2003-02-13  0:16           ` Kim F. Storm
2003-02-11 16:03   ` Luc Teirlinck
2003-02-12  7:19 ` Richard Stallman

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=5xisvqvrac.fsf@kfs2.cua.dk \
    --to=storm@cua.dk \
    --cc=emacs-devel@gnu.org \
    /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).