From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Don March Newsgroups: gmane.emacs.bugs Subject: bug#7631: 24.0.50; inconsistency in event-convert-list and event-basic-type Date: Mon, 13 Dec 2010 01:22:32 -0500 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: dough.gmane.org 1292224934 9614 80.91.229.12 (13 Dec 2010 07:22:14 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 13 Dec 2010 07:22:14 +0000 (UTC) To: 7631@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Dec 13 08:22:10 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PS2jR-0005ko-T4 for geb-bug-gnu-emacs@m.gmane.org; Mon, 13 Dec 2010 08:22:07 +0100 Original-Received: from localhost ([127.0.0.1]:34149 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PS2jO-0003Ui-4n for geb-bug-gnu-emacs@m.gmane.org; Mon, 13 Dec 2010 02:21:58 -0500 Original-Received: from [140.186.70.92] (port=36809 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PS2Gt-0006Sf-KC for bug-gnu-emacs@gnu.org; Mon, 13 Dec 2010 01:52:32 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PS2Gs-0004O5-Gh for bug-gnu-emacs@gnu.org; Mon, 13 Dec 2010 01:52:31 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:60517) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PS2Gs-0004O1-B9 for bug-gnu-emacs@gnu.org; Mon, 13 Dec 2010 01:52:30 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1PS1iY-0002Y3-Ei; Mon, 13 Dec 2010 01:17:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Don March Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 13 Dec 2010 06:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 7631 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.12922210159777 (code B ref -1); Mon, 13 Dec 2010 06:17:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 13 Dec 2010 06:16:55 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PS1iR-0002Xd-2i for submit@debbugs.gnu.org; Mon, 13 Dec 2010 01:16:55 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PS1iO-0002XS-IE for submit@debbugs.gnu.org; Mon, 13 Dec 2010 01:16:53 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PS1oL-000720-Pd for submit@debbugs.gnu.org; Mon, 13 Dec 2010 01:23:02 -0500 Original-Received: from lists.gnu.org ([199.232.76.165]:60918) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PS1oL-00071v-Nb for submit@debbugs.gnu.org; Mon, 13 Dec 2010 01:23:01 -0500 Original-Received: from [140.186.70.92] (port=51581 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PS1oJ-0007o7-M5 for bug-gnu-emacs@gnu.org; Mon, 13 Dec 2010 01:23:01 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PS1oH-00071D-TE for bug-gnu-emacs@gnu.org; Mon, 13 Dec 2010 01:22:59 -0500 Original-Received: from cl33.gs01.gridserver.com ([64.13.192.42]:48961) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PS1oH-00070X-Oi for bug-gnu-emacs@gnu.org; Mon, 13 Dec 2010 01:22:57 -0500 Original-Received: from mail-iw0-f175.google.com ([209.85.214.175]:57485) by cl33.gs01.gridserver.com with esmtpsa (TLS-1.0:RSA_ARCFOUR_MD5:16) (Exim 4.63) (envelope-from ) id 1PS1oE-0005Vy-08 for bug-gnu-emacs@gnu.org; Sun, 12 Dec 2010 22:22:55 -0800 Original-Received: by iwn8 with SMTP id 8so8752524iwn.34 for ; Sun, 12 Dec 2010 22:22:52 -0800 (PST) Original-Received: by 10.42.164.66 with SMTP id f2mr2423767icy.431.1292221372395; Sun, 12 Dec 2010 22:22:52 -0800 (PST) Original-Received: by 10.42.222.134 with HTTP; Sun, 12 Dec 2010 22:22:32 -0800 (PST) X-Authenticated-User: 14129 don@ohspite.net X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Mon, 13 Dec 2010 01:17:02 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Mailman-Approved-At: Mon, 13 Dec 2010 02:21:29 -0500 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:42479 Archived-At: The definition for `event-convert-list' in keyboard.c has the following code, which causes symbols consisting of a single character to be interpreted as the character itself: /* Let the symbol A refer to the character A. */ if (SYMBOLP (base) && SCHARS (SYMBOL_NAME (base)) == 1) XSETINT (base, SREF (SYMBOL_NAME (base), 0)); I see how this is well-intentioned but I don't think that it's useful, particularly because of the case where the symbol is `t'. (event-convert-list '(t)) ; => 116 There's good reason to want this to eval to t (i.e. the symbol, not the char). For example, I found this interesting behavior when using `map-keymap' to automate remapping commands from C- with M-. It also seems to produce inconsistent results: (event-convert-list '(nil)) ; => nil (event-convert-list '(t)) ; => 116 (event-convert-list '(tt)) ; => tt (event-convert-list '(control t)) ; => 20 (event-convert-list '(control tt)) ; => C-tt If, however, this the Right Thing for some reason I don't see, the documentation for `event-convert-list' needs to be changed: "The return value is an event type (a character or symbol) ***which has the same base event type*** and all the specified modifiers" (emphasis added). (event-convert-list '(t)) ; => 116 (event-basic-type t) ; => t In GNU Emacs 24.0.50.1 (i686-pc-linux-gnu, GTK+ Version 2.22.0) of 2010-12-12 on lappy Windowing system distributor `The X.Org Foundation', version 11.0.10900000 Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_US.utf8 value of $XMODIFIERS: nil locale-coding-system: utf-8-unix default enable-multibyte-characters: t