From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Gerard Brunick Newsgroups: gmane.emacs.bugs,gmane.emacs.pretest.bugs Subject: bug#2179: 23.0.60; define-key vs define-key-after key syntax Date: Tue, 03 Feb 2009 01:31:34 -0600 Message-ID: <4987F2D6.2010900@math.utexas.edu> Reply-To: Gerard Brunick , 2179@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1233674515 2102 80.91.229.12 (3 Feb 2009 15:21:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 3 Feb 2009 15:21:55 +0000 (UTC) To: emacs-pretest-bug@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Feb 03 16:23:09 2009 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.50) id 1LUN6x-0003Mo-In for geb-bug-gnu-emacs@m.gmane.org; Tue, 03 Feb 2009 16:22:51 +0100 Original-Received: from localhost ([127.0.0.1]:51911 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LUN5e-0003wk-PY for geb-bug-gnu-emacs@m.gmane.org; Tue, 03 Feb 2009 10:21:30 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LUFwV-0000pW-N9 for bug-gnu-emacs@gnu.org; Tue, 03 Feb 2009 02:43:35 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LUFwU-0000od-QD for bug-gnu-emacs@gnu.org; Tue, 03 Feb 2009 02:43:35 -0500 Original-Received: from [199.232.76.173] (port=56606 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LUFwU-0000oL-Id for bug-gnu-emacs@gnu.org; Tue, 03 Feb 2009 02:43:34 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:54600) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LUFwT-00047v-VS for bug-gnu-emacs@gnu.org; Tue, 03 Feb 2009 02:43:34 -0500 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n137hVZ1026605; Mon, 2 Feb 2009 23:43:31 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id n137e5wZ025576; Mon, 2 Feb 2009 23:40:05 -0800 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Gerard Brunick Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Tue, 03 Feb 2009 07:40:04 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: report 2179 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by submit@emacsbugs.donarmstrong.com id=B.123364631424172 (code B ref -1); Tue, 03 Feb 2009 07:40:04 +0000 Original-Received: (at submit) by emacsbugs.donarmstrong.com; 3 Feb 2009 07:31:54 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n137Vo3v024166 for ; Mon, 2 Feb 2009 23:31:52 -0800 Original-Received: from mx10.gnu.org ([199.232.76.166]:48858) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1LUFjP-0005K7-Ho for emacs-pretest-bug@gnu.org; Tue, 03 Feb 2009 02:30:03 -0500 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1LUFl4-0002yJ-Gf for emacs-pretest-bug@gnu.org; Tue, 03 Feb 2009 02:31:47 -0500 Original-Received: from dell3.ma.utexas.edu ([146.6.139.124]:41626 helo=ibm3.ma.utexas.edu) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LUFl4-0002y3-0i for emacs-pretest-bug@gnu.org; Tue, 03 Feb 2009 02:31:46 -0500 Original-Received: from [192.168.1.149] (rrcs-71-42-216-171.sw.biz.rr.com [71.42.216.171]) (authenticated bits=0) by ibm3.ma.utexas.edu (8.13.6/8.13.6/Debian-1) with ESMTP id n137VcWO017409 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 3 Feb 2009 01:31:39 -0600 User-Agent: Thunderbird 2.0.0.19 (X11/20090105) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Tue, 03 Feb 2009 02:43:35 -0500 X-Mailman-Approved-At: Tue, 03 Feb 2009 10:21:24 -0500 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list 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:24900 gmane.emacs.pretest.bugs:23840 Archived-At: This may or may not be a bug, but it caused me some pain, so I am pointing it out. (define-key my-map [(control l)] 'do-something) works as expected, but (define-key-after my-map [(control l)] 'do-something) does not. The reason is that define-key does a lot of work to allow for a wide range of key syntaxes, but define-key-after just does: (setq key (if (<= (length key) 1) (aref key 0) ... and (control l) must get mapped to ?\C-l = 12 to be useful in a keymap. As I say, I'm not sure this is a bug, but it was rather counter-intuitive to me, so maybe a warning to this effect in the documentation for define-key-after would be sufficient. The current documentation says "... This is like `define-key' except that the binding for KEY is placed just after the binding for the event AFTER ..." Cheers, Gerard