From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Stuart D. Herring" Newsgroups: gmane.emacs.devel Subject: `key-binding' and XEmacs-style events Date: Wed, 28 Feb 2007 14:57:53 -0800 (PST) Message-ID: <36817.128.165.123.18.1172703473.squirrel@webmail.lanl.gov> Reply-To: herring@lanl.gov NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1172703543 9821 80.91.229.12 (28 Feb 2007 22:59:03 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 28 Feb 2007 22:59:03 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Feb 28 23:58:54 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HMXl8-000607-34 for ged-emacs-devel@m.gmane.org; Wed, 28 Feb 2007 23:58:54 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HMXl9-0003OJ-1s for ged-emacs-devel@m.gmane.org; Wed, 28 Feb 2007 17:58:55 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HMXkF-0002Xd-Dm for emacs-devel@gnu.org; Wed, 28 Feb 2007 17:57:59 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HMXkD-0002Vo-Dt for emacs-devel@gnu.org; Wed, 28 Feb 2007 17:57:59 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HMXkD-0002Vg-6T for emacs-devel@gnu.org; Wed, 28 Feb 2007 17:57:57 -0500 Original-Received: from mailwasher.lanl.gov ([192.65.95.54] helo=mailwasher-b.lanl.gov) by monty-python.gnu.org with esmtp (Exim 4.52) id 1HMXkC-0000lR-Mc for emacs-devel@gnu.org; Wed, 28 Feb 2007 17:57:56 -0500 Original-Received: from mailrelay3.lanl.gov (mailrelay3.lanl.gov [128.165.4.104]) by mailwasher-b.lanl.gov (8.13.8/8.13.8/(ccn-5)) with ESMTP id l1SMvsCn011226 for ; Wed, 28 Feb 2007 15:57:54 -0700 Original-Received: from webmail1.lanl.gov (webmail1.lanl.gov [128.165.4.106]) by mailrelay3.lanl.gov (8.13.8/8.13.8/(ccn-5)) with ESMTP id l1SMvrDP012394 for ; Wed, 28 Feb 2007 15:57:54 -0700 Original-Received: from webmail1.lanl.gov (localhost.localdomain [127.0.0.1]) by webmail1.lanl.gov (8.12.11.20060308/8.12.11) with ESMTP id l1SMvra4032282 for ; Wed, 28 Feb 2007 15:57:53 -0700 Original-Received: (from apache@localhost) by webmail1.lanl.gov (8.12.11.20060308/8.12.11/Submit) id l1SMvrOl032279; Wed, 28 Feb 2007 14:57:53 -0800 X-Authentication-Warning: webmail1.lanl.gov: apache set sender to herring@lanl.gov using -f Original-Received: from 128.165.123.18 (SquirrelMail authenticated user 196434) by webmail.lanl.gov with HTTP; Wed, 28 Feb 2007 14:57:53 -0800 (PST) User-Agent: SquirrelMail/1.4.8-2.el3.7lanl X-Priority: 3 (Normal) Importance: Normal X-PMX-Version: 4.7.1.128075 X-detected-kernel: Linux 2.4-2.6 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:67084 Archived-At: I have noticed, when writing some automatic key-generation code, that (key-binding [(?a)]) (or any other character) yields a type error because ?a is not a symbol. The problem is that at keymap.c:1615, if the function's argument is a vector and its first element is a cons, it is assumed that the element is a mouse-like event which is a list started by a symbol. This does no particular harm for (key-binding [(control ?a)]) because 'control is merely discovered to have no interesting properties as an event symbol, but it's a problem in the trivial one-character case. Obviously (key-binding [?a]) works just as well, but in order to write code that flexibly manipulates keystrokes it would be nice if the XEmacs syntax could always be used even in degenerate cases. I don't claim to understand events very well, so perhaps I am alone in this opinion, but this strikes me as a bug. Thoughts? Davis -- This product is sold by volume, not by mass. If it appears too dense or too sparse, it is because mass-energy conversion has occurred during shipping.