From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#23543: 25.1.50; Incorrect key binding echoed by `M-x' Date: Sun, 28 Jul 2019 14:39:34 +0200 Message-ID: <87r26abaex.fsf@mouse.gnus.org> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="34946"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 23543@debbugs.gnu.org To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jul 28 14:40:10 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hriTB-00090m-K3 for geb-bug-gnu-emacs@m.gmane.org; Sun, 28 Jul 2019 14:40:09 +0200 Original-Received: from localhost ([::1]:45116 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hriTA-0007U6-LP for geb-bug-gnu-emacs@m.gmane.org; Sun, 28 Jul 2019 08:40:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53082) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hriT5-0007TV-DO for bug-gnu-emacs@gnu.org; Sun, 28 Jul 2019 08:40:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hriT4-00069O-Bo for bug-gnu-emacs@gnu.org; Sun, 28 Jul 2019 08:40:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37080) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hriT4-00069F-7j for bug-gnu-emacs@gnu.org; Sun, 28 Jul 2019 08:40:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hriT4-00033u-2J for bug-gnu-emacs@gnu.org; Sun, 28 Jul 2019 08:40:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 28 Jul 2019 12:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23543 X-GNU-PR-Package: emacs Original-Received: via spool by 23543-submit@debbugs.gnu.org id=B23543.156431758211727 (code B ref 23543); Sun, 28 Jul 2019 12:40:02 +0000 Original-Received: (at 23543) by debbugs.gnu.org; 28 Jul 2019 12:39:42 +0000 Original-Received: from localhost ([127.0.0.1]:45898 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hriSk-000335-5I for submit@debbugs.gnu.org; Sun, 28 Jul 2019 08:39:42 -0400 Original-Received: from quimby.gnus.org ([80.91.231.51]:55288) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hriSh-00032s-EM for 23543@debbugs.gnu.org; Sun, 28 Jul 2019 08:39:40 -0400 Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hriSc-0003z2-VA; Sun, 28 Jul 2019 14:39:37 +0200 In-Reply-To: (Drew Adams's message of "Sun, 15 May 2016 14:32:30 -0700 (PDT)") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.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" Xref: news.gmane.org gmane.emacs.bugs:163951 Archived-At: Drew Adams writes: > emacs -Q > > (define-key global-map [remap eval-last-sexp] 'pp-eval-last-sexp) > > Put point after a Lisp sexp somewhere, and do `M-x eval-last-sexp'. > > You see this echoed: > > You can run the command 'eval-last-sexp' with C-x C-e > > But that is incorrect. You cannot run `eval-last-sexp' > using `C-x C-e', since it has been remapped to command > `pp-eval-last-sexp'. If you use `C-x C-e' you invoke > the latter, not `eval-last-sexp'. I can confirm that this is still present in Emacs 27. > The code that causes this bugged behavior is the call > to `where-is-internal' in `execute-extended-command'. > It does, in effect: > > (where-is-internal 'eval-last-sexp overriding-local-map t) > > And that returns [24 5]. I'm no expert on `overriding-local-map', > but should it really be used here? Seems like this is the cause, > but whatever the cause, the message is incorrect. When I trace this, `overriding-local-map' is nil, and indeed: (where-is-internal 'eval-last-sexp) => ([24 5]) So that doesn't seem to have anything to do with this bug, and it's just a bug in `where-is-internal'. The doc string does talk about remapping, but I'm not sure whether this is the same kind of remapping we have here? In any case, it doesn't make a difference: The optional 5th arg NO-REMAP alters how command remapping is handled: - If another command OTHER-COMMAND is remapped to DEFINITION, normally search for the bindings of OTHER-COMMAND and include them in the returned list. But if NO-REMAP is non-nil, include the vector [remap OTHER-COMMAND] in the returned list instead, without searching for those other bindings. - If DEFINITION is remapped to OTHER-COMMAND, normally return the bindings for OTHER-COMMAND. But if NO-REMAP is non-nil, return the bindings for DEFINITION instead, ignoring its remapping. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no