From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lars Magne Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#2179: 23.0.60; define-key vs define-key-after key syntax Date: Sun, 11 Sep 2011 23:18:20 +0200 Message-ID: References: <4987F2D6.2010900@math.utexas.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1315776478 13071 80.91.229.12 (11 Sep 2011 21:27:58 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 11 Sep 2011 21:27:58 +0000 (UTC) Cc: 2179@debbugs.gnu.org To: Gerard Brunick Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Sep 11 23:27:53 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1R2rZA-0001UH-3M for geb-bug-gnu-emacs@m.gmane.org; Sun, 11 Sep 2011 23:27:52 +0200 Original-Received: from localhost ([::1]:50377 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R2rZ9-00006q-IQ for geb-bug-gnu-emacs@m.gmane.org; Sun, 11 Sep 2011 17:27:51 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:34428) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R2rZ6-0008SR-3s for bug-gnu-emacs@gnu.org; Sun, 11 Sep 2011 17:27:48 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R2rZ4-0000Vz-PA for bug-gnu-emacs@gnu.org; Sun, 11 Sep 2011 17:27:48 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:49703) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R2rZ4-0000Vs-NX for bug-gnu-emacs@gnu.org; Sun, 11 Sep 2011 17:27:46 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1R2rdD-0004c9-Pn; Sun, 11 Sep 2011 17:32:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Magne Ingebrigtsen Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 11 Sep 2011 21:32:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 2179 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 2179-submit@debbugs.gnu.org id=B2179.131577671817702 (code B ref 2179); Sun, 11 Sep 2011 21:32:03 +0000 Original-Received: (at 2179) by debbugs.gnu.org; 11 Sep 2011 21:31:58 +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 1R2rd7-0004bS-L3 for submit@debbugs.gnu.org; Sun, 11 Sep 2011 17:31:57 -0400 Original-Received: from hermes.netfonds.no ([80.91.224.195]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R2rd0-0004an-Q7 for 2179@debbugs.gnu.org; Sun, 11 Sep 2011 17:31:53 -0400 Original-Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58] helo=stories.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1R2rYk-0001CP-Ie; Sun, 11 Sep 2011 23:27:26 +0200 In-Reply-To: <4987F2D6.2010900@math.utexas.edu> (Gerard Brunick's message of "Tue, 03 Feb 2009 01:31:34 -0600") User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux) X-Now-Playing: Scout Niblett's _This Fool Can Die Now_: "Dinosaur Egg" X-MailScanner-ID: 1R2rYk-0001CP-Ie MailScanner-NULL-Check: 1316381246.88778@KgIK6SYX9c6axPsL/rhfzw X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sun, 11 Sep 2011 17:32:03 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-Received-From: 140.186.70.43 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: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:50999 Archived-At: Gerard Brunick writes: > (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. Yes, you'd expect both key's to allow the same syntax. However, as far as I can see, all the magic to translate from the `define-key' key syntax is inside that C function, so that would have to be refactored out first. I think. `define-key-after' should at least document the restricted key syntax it allows... -- (domestic pets only, the antidote for overdose, milk.) bloggy blog http://lars.ingebrigtsen.no/