From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#21412: 25.0.50; substitute-command-keys suggests M-x instead of key binding Date: Sat, 5 Sep 2015 08:54:21 -0700 Organization: UCLA Computer Science Department Message-ID: <55EB102D.5060304@cs.ucla.edu> References: <55E9B6C1.9070204@cs.ucla.edu> <87si6uvt3o.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------050308050100040700010805" X-Trace: ger.gmane.org 1441468539 14715 80.91.229.3 (5 Sep 2015 15:55:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 5 Sep 2015 15:55:39 +0000 (UTC) Cc: 21412-done@debbugs.gnu.org To: Tassilo Horn Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Sep 05 17:55:18 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZYFoB-0001u1-Mr for geb-bug-gnu-emacs@m.gmane.org; Sat, 05 Sep 2015 17:55:15 +0200 Original-Received: from localhost ([::1]:41158 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYFoB-00006X-KS for geb-bug-gnu-emacs@m.gmane.org; Sat, 05 Sep 2015 11:55:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39262) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYFo3-0008VH-UL for bug-gnu-emacs@gnu.org; Sat, 05 Sep 2015 11:55:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZYFnz-0000XS-BV for bug-gnu-emacs@gnu.org; Sat, 05 Sep 2015 11:55:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:57854) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYFnz-0000Wz-71 for bug-gnu-emacs@gnu.org; Sat, 05 Sep 2015 11:55:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZYFnz-0002qj-1B for bug-gnu-emacs@gnu.org; Sat, 05 Sep 2015 11:55:03 -0400 Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Sat, 05 Sep 2015 15:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 21412 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Mail-Followup-To: 21412@debbugs.gnu.org, eggert@cs.ucla.edu, tsdh@gnu.org Original-Received: via spool by 21412-done@debbugs.gnu.org id=D21412.144146846610898 (code D ref 21412); Sat, 05 Sep 2015 15:55:02 +0000 Original-Received: (at 21412-done) by debbugs.gnu.org; 5 Sep 2015 15:54:26 +0000 Original-Received: from localhost ([127.0.0.1]:50062 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZYFnN-0002pi-Np for submit@debbugs.gnu.org; Sat, 05 Sep 2015 11:54:26 -0400 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:55625) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZYFnL-0002pZ-GU for 21412-done@debbugs.gnu.org; Sat, 05 Sep 2015 11:54:24 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 6FDC0160FF7; Sat, 5 Sep 2015 08:54:22 -0700 (PDT) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id UOOyjfsuE0Es; Sat, 5 Sep 2015 08:54:21 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id A74AD16100C; Sat, 5 Sep 2015 08:54:21 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 6QcCWFXu-s2i; Sat, 5 Sep 2015 08:54:21 -0700 (PDT) Original-Received: from [192.168.1.9] (pool-100-32-155-148.lsanca.fios.verizon.net [100.32.155.148]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 86EFB160FF7; Sat, 5 Sep 2015 08:54:21 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 In-Reply-To: <87si6uvt3o.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 208.118.235.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:106180 Archived-At: This is a multi-part message in MIME format. --------------050308050100040700010805 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Thanks for the recipe involving only built-in commands, which made it easy for me to see the bug. I installed the attached patch and am marking the bug as fixed. --------------050308050100040700010805 Content-Type: text/x-diff; name="0001-Fix-describe-function-keybinding-confusion.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0001-Fix-describe-function-keybinding-confusion.patch" >From 089722365776406bfc64d7947f1c04180dfc1530 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 5 Sep 2015 08:50:34 -0700 Subject: [PATCH] Fix describe-function keybinding confusion * lisp/help-fns.el (describe-function-1): Compute signature in the original buffer, not in standard-output, so that substitute-command-keys uses the proper keybindings. This fixes Bug#21412, introduced in commit 2015-06-11T10:23:46-0700!eggert@cs.ucla.edu. --- lisp/help-fns.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lisp/help-fns.el b/lisp/help-fns.el index a1d121c..f5c7eb3 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -614,9 +614,9 @@ FILE is the file where FUNCTION was probably defined." (autoload-do-load real-def)) (help-fns--key-bindings function) - (with-current-buffer standard-output - (let ((doc (help-fns--signature function doc-raw sig-key - real-function nil))) + (let ((doc (help-fns--signature function doc-raw sig-key + real-function nil))) + (with-current-buffer standard-output (run-hook-with-args 'help-fns-describe-function-functions function) (insert "\n" (or doc "Not documented.")))))))) -- 2.1.0 --------------050308050100040700010805--