From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#24221: 25.1.50; binding anonymous functions to keys cause help buffer navigation errors Date: Fri, 16 Sep 2016 10:43:46 -0700 (PDT) Message-ID: References: <95980cc0-0429-449a-8e98-e629b2e885b8@default> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1474047911 8460 195.159.176.226 (16 Sep 2016 17:45:11 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 16 Sep 2016 17:45:11 +0000 (UTC) Cc: 24221@debbugs.gnu.org To: peder@klingenberg.no, Zachary Kanfer Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Sep 16 19:45:07 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bkxCC-0001GK-94 for geb-bug-gnu-emacs@m.gmane.org; Fri, 16 Sep 2016 19:45:04 +0200 Original-Received: from localhost ([::1]:42914 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bkxCA-0003PA-Ds for geb-bug-gnu-emacs@m.gmane.org; Fri, 16 Sep 2016 13:45:02 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40047) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bkxBF-0002ir-1F for bug-gnu-emacs@gnu.org; Fri, 16 Sep 2016 13:44:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bkxBB-0005H9-TA for bug-gnu-emacs@gnu.org; Fri, 16 Sep 2016 13:44:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:35829) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bkxBB-0005H3-QM for bug-gnu-emacs@gnu.org; Fri, 16 Sep 2016 13:44:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bkxBB-0003p0-LF for bug-gnu-emacs@gnu.org; Fri, 16 Sep 2016 13:44:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 16 Sep 2016 17:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24221 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 24221-submit@debbugs.gnu.org id=B24221.147404783814675 (code B ref 24221); Fri, 16 Sep 2016 17:44:01 +0000 Original-Received: (at 24221) by debbugs.gnu.org; 16 Sep 2016 17:43:58 +0000 Original-Received: from localhost ([127.0.0.1]:33541 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bkxB7-0003od-U6 for submit@debbugs.gnu.org; Fri, 16 Sep 2016 13:43:58 -0400 Original-Received: from userp1040.oracle.com ([156.151.31.81]:44878) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bkxB6-0003oN-0h for 24221@debbugs.gnu.org; Fri, 16 Sep 2016 13:43:56 -0400 Original-Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u8GHhmDB017297 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 16 Sep 2016 17:43:49 GMT Original-Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0021.oracle.com (8.13.8/8.13.8) with ESMTP id u8GHhmhL021915 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 16 Sep 2016 17:43:48 GMT Original-Received: from abhmp0013.oracle.com (abhmp0013.oracle.com [141.146.116.19]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id u8GHhl23020638; Fri, 16 Sep 2016 17:43:47 GMT In-Reply-To: <95980cc0-0429-449a-8e98-e629b2e885b8@default> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6753.5000 (x86)] X-Source-IP: aserv0021.oracle.com [141.146.126.233] 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: 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" Xref: news.gmane.org gmane.emacs.bugs:123388 Archived-At: This is the problem behind this regression: 1. `describe-key' calls `describe-function', passing it the command definition. 2. Someone changed `describe-function' so that it now barfs if its arg is not a function symbol. The doc string of `describe-function' says (and has long said) that the arg is a symbol. However, that should be the case only for interactive use (the `completing-read' call requires a match against a function symbol). What should be done: 1. Remove the error for a non-symbol, except perhaps for the interactive case. 2. Fix the doc, to say that it need not be a symbol when called from Lisp. Before the regression was introduced, both `describe-function' and using `[back]' to get to it worked for a lambda form. And a doc string in the lambda form was shown correctly as the doc, in *Help* - just as if the function had a name. And a byte-compiled lambda form also worked perfectly well prior to the introduction of the regression: (global-set-key (kbd "C-c l") (byte-compile (lambda () "DOC" (interactive) (message "FOO")))) This regression removed a bunch of useful behavior. `describe-function' should describe a function - any function. The argument should be limited to a function symbol only when called interactively. (An argument could even be made that it should not even be so limited for interactive use, that is, that `completing-read' should be lax, letting you type a lambda form if you want. I'm not making that argument here, however.)