From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Stefan Monnier" Newsgroups: gmane.emacs.devel Subject: Re: C-h k, C-h f and keyboard macros: Patch. Date: Tue, 11 Feb 2003 11:19:03 -0500 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <200302111619.h1BGJ3p27311@rum.cs.yale.edu> References: <200302102356.RAA04775@eel.dms.auburn.edu> <5xsmuvufn1.fsf@kfs2.cua.dk> <20030211134619.B425.LEKTU@terra.es> <5xisvqvrac.fsf@kfs2.cua.dk> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1044980352 6176 80.91.224.249 (11 Feb 2003 16:19:12 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 11 Feb 2003 16:19:12 +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 18id7l-0001b8-00 for ; Tue, 11 Feb 2003 17:19:09 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18idJJ-0003d2-00 for ; Tue, 11 Feb 2003 17:31:05 +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 18id8G-0000KZ-02 for emacs-devel@quimby.gnus.org; Tue, 11 Feb 2003 11:19:40 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18id7q-00008Y-00 for emacs-devel@gnu.org; Tue, 11 Feb 2003 11:19:14 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18id7m-0008Sb-00 for emacs-devel@gnu.org; Tue, 11 Feb 2003 11:19:11 -0500 Original-Received: from rum.cs.yale.edu ([128.36.229.169]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18id7i-0008M3-00 for emacs-devel@gnu.org; Tue, 11 Feb 2003 11:19:06 -0500 Original-Received: (from monnier@localhost) by rum.cs.yale.edu (8.11.6/8.11.6) id h1BGJ3p27311; Tue, 11 Feb 2003 11:19:03 -0500 X-Mailer: exmh version 2.4 06/23/2000 with nmh-1.0.4 Original-To: storm@cua.dk (Kim F. Storm) Original-cc: Juanma Barranquero 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:11564 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:11564 > 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. Stefan