From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: C-h k, C-h f and keyboard macros: Patch. Date: 11 Feb 2003 15:13:47 +0100 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <5xisvqvrac.fsf@kfs2.cua.dk> References: <200302102356.RAA04775@eel.dms.auburn.edu> <5xsmuvufn1.fsf@kfs2.cua.dk> <20030211134619.B425.LEKTU@terra.es> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1044969446 15570 80.91.224.249 (11 Feb 2003 13:17:26 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 11 Feb 2003 13:17:26 +0000 (UTC) Cc: emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18iaHs-00042o-00 for ; Tue, 11 Feb 2003 14:17:24 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18iaTN-0001oP-00 for ; Tue, 11 Feb 2003 14:29:17 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18iaGZ-0004zj-0A for emacs-devel@quimby.gnus.org; Tue, 11 Feb 2003 08:16:03 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18iaFM-0003ph-00 for emacs-devel@gnu.org; Tue, 11 Feb 2003 08:14:48 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18iaFD-0003jQ-00 for emacs-devel@gnu.org; Tue, 11 Feb 2003 08:14:40 -0500 Original-Received: from mail.filanet.dk ([195.215.206.179]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18iaFC-0003fp-00 for emacs-devel@gnu.org; Tue, 11 Feb 2003 08:14:38 -0500 Original-Received: from kfs2.cua.dk.cua.dk (kfs2.local.filanet.dk [192.168.1.182]) by mail.filanet.dk (Postfix) with SMTP id ADA027C012; Tue, 11 Feb 2003 14:14:37 +0100 (CET) Original-To: Juanma Barranquero In-Reply-To: <20030211134619.B425.LEKTU@terra.es> Original-Lines: 37 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 Original-cc: Luc Teirlinck X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:11556 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:11556 Juanma Barranquero 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 http://www.cua.dk