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#7541: 24.0.50; define-key error message for non-prefix M-[char] Date: Sun, 03 Jul 2011 15:39:45 +0200 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1309700493 19395 80.91.229.12 (3 Jul 2011 13:41:33 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 3 Jul 2011 13:41:33 +0000 (UTC) Cc: 7541@debbugs.gnu.org To: Don March Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jul 03 15:41:26 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 1QdMvO-0006Po-Od for geb-bug-gnu-emacs@m.gmane.org; Sun, 03 Jul 2011 15:41:26 +0200 Original-Received: from localhost ([::1]:48253 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QdMvN-0007WL-Rp for geb-bug-gnu-emacs@m.gmane.org; Sun, 03 Jul 2011 09:41:25 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:59706) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QdMv3-0007Vr-5y for bug-gnu-emacs@gnu.org; Sun, 03 Jul 2011 09:41:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QdMv1-0000Cm-3Z for bug-gnu-emacs@gnu.org; Sun, 03 Jul 2011 09:41:04 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:37379) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QdMv0-0000Ci-S1 for bug-gnu-emacs@gnu.org; Sun, 03 Jul 2011 09:41:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1QdMv0-0007PO-1d; Sun, 03 Jul 2011 09:41:02 -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, 03 Jul 2011 13:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 7541 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 7541-submit@debbugs.gnu.org id=B7541.130970041428425 (code B ref 7541); Sun, 03 Jul 2011 13:41:02 +0000 Original-Received: (at 7541) by debbugs.gnu.org; 3 Jul 2011 13:40:14 +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 1QdMuE-0007OQ-0B for submit@debbugs.gnu.org; Sun, 03 Jul 2011 09:40:14 -0400 Original-Received: from hermes.netfonds.no ([80.91.224.195]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QdMuA-0007O7-OP for 7541@debbugs.gnu.org; Sun, 03 Jul 2011 09:40:12 -0400 Original-Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58] helo=quimbies.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1QdMty-0000F1-GP; Sun, 03 Jul 2011 15:39:58 +0200 In-Reply-To: (Don March's message of "Fri, 3 Dec 2010 11:35:03 -0500") User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux) X-Now-Playing: Siouxsie and the Banshees's _Kaleidoscope_: "Hybrid" X-Hashcash: 1:23:110703:don@ohspite.net::jkkVU9xzEGFaAhCb:015E1f X-Hashcash: 1:23:110703:7541@debbugs.gnu.org::flm9JBBGulZqFBFX:00000000000000000000000000000000000000001D+Dp X-MailScanner-ID: 1QdMty-0000F1-GP MailScanner-NULL-Check: 1310305198.58056@SpKGGZO3u63bJl54340dpQ X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sun, 03 Jul 2011 09:41:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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:47827 Archived-At: Don March writes: > Typing and evaluating the following code in the scratch > buffer results in an (appropriate) error, but with an incorrect > message: > > (setq new-kmap (make-sparse-keymap)) > (define-key new-kmap [?a 27] 'command) > (define-key new-kmap [?a ?\M-x] 'command) > ;; Debugger entered--Lisp error: > ;; (error "Key sequence a M-x starts with non-prefix key a") > ;; (should be: > ;; "Key sequence a M-x starts with non-prefix key a ESC") > > The code in keymap.c loops over the characters in the key sequence and > says to report everything before the current character as the > non-prefix key. But that misses the case when M-x is converted into > [27 ?x] and it's the `27' part that causes the error. Your patch for this bug looks correct, but it's more than 10 lines long, so the FSF needs copyright assignment papers for the code. Do you have such paperwork on file with the FSF? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog http://lars.ingebrigtsen.no/