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#1525: prompt string for execute-extended-command not flexible Date: Sun, 10 Jul 2011 15:15:51 +0200 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1310303848 28193 80.91.229.12 (10 Jul 2011 13:17:28 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 10 Jul 2011 13:17:28 +0000 (UTC) Cc: 1525@debbugs.gnu.org To: xah lee Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jul 10 15:17:24 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 1Qftsx-0004ZH-M5 for geb-bug-gnu-emacs@m.gmane.org; Sun, 10 Jul 2011 15:17:23 +0200 Original-Received: from localhost ([::1]:38882 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qftsw-0004uM-KY for geb-bug-gnu-emacs@m.gmane.org; Sun, 10 Jul 2011 09:17:22 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:40369) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qftse-0004tt-6y for bug-gnu-emacs@gnu.org; Sun, 10 Jul 2011 09:17:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qftsc-0001Yh-Ec for bug-gnu-emacs@gnu.org; Sun, 10 Jul 2011 09:17:04 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:59723) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qftsc-0001Yb-65 for bug-gnu-emacs@gnu.org; Sun, 10 Jul 2011 09:17:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1Qftsb-0002rc-Jp; Sun, 10 Jul 2011 09:17:01 -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, 10 Jul 2011 13:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 1525 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 1525-submit@debbugs.gnu.org id=B1525.131030379610975 (code B ref 1525); Sun, 10 Jul 2011 13:17:01 +0000 Original-Received: (at 1525) by debbugs.gnu.org; 10 Jul 2011 13:16:36 +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 1QftsB-0002qx-PP for submit@debbugs.gnu.org; Sun, 10 Jul 2011 09:16:36 -0400 Original-Received: from hermes.netfonds.no ([80.91.224.195]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Qfts9-0002qm-8z for 1525@debbugs.gnu.org; Sun, 10 Jul 2011 09:16:34 -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 1Qftrx-0000Ep-NG; Sun, 10 Jul 2011 15:16:21 +0200 In-Reply-To: (xah lee's message of "Tue, 9 Dec 2008 14:36:36 -0800") User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux) X-Now-Playing: The Human League's _Credo_: "Sky" X-Hashcash: 1:23:110710:xah@xahlee.org::kwaNCw17JhLMzaSR:000A3ZQ X-Hashcash: 1:23:110710:1525@debbugs.gnu.org::lK4adp1Fsgpu8Zbz:00000000000000000000000000000000000000000LJ/7 X-MailScanner-ID: 1Qftrx-0000Ep-NG MailScanner-NULL-Check: 1310908581.79689@vAooft53ubbAXYhdCeIzIw X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sun, 10 Jul 2011 09:17:01 -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:48462 Archived-At: xah lee writes: > The prompt string for execute-extended-command is =93M-x =94, but that is > not correct if the command is bound to some other key by > customization. > > Kevin Rodgers gave this explanation recently in =93gnu.emacs.help=94: > > =AB > seber...@spawar.navy.mil wrote: >> When you type a command in Emacs you are greeted with the prompt "M- >> x". How change that prompt string? > > Change this code in src/keyboard.c and recompile emacs: > /* This isn't strictly correct if execute-extended-command > is bound to anything else. Perhaps it should use > this_command_keys? */ > strcat (buf, "M-x "); This is no longer done, but it's still not quite right. If you do: (local-set-key [(meta z)] 'execute-extended-command) Then you still get "M-x" as the prompt if you do `M-z'. The reason is that it looks up the command first, and then picks one of the bindings as the description, with code that's kinda like this: (key-description (car (where-is-internal 'execute-extended-command))) Is there any reason it doesn't just use this_command_keys which presumably would be more correct? --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog http://lars.ingebrigtsen.no/