From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#23258: 25.1.50; The docstring of with-eval-after-load needs improvement Date: Sun, 10 Apr 2016 09:21:46 -0700 (PDT) Message-ID: <6ba754ce-e37a-4334-a48c-64b55f506ed4@default> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1460305333 15761 80.91.229.3 (10 Apr 2016 16:22:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 10 Apr 2016 16:22:13 +0000 (UTC) To: Harald Hanche-Olsen , 23258@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Apr 10 18:22:12 2016 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 1apI7n-0001gx-T2 for geb-bug-gnu-emacs@m.gmane.org; Sun, 10 Apr 2016 18:22:12 +0200 Original-Received: from localhost ([::1]:35537 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1apI7n-0000FN-1N for geb-bug-gnu-emacs@m.gmane.org; Sun, 10 Apr 2016 12:22:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33755) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1apI7h-0000B5-FK for bug-gnu-emacs@gnu.org; Sun, 10 Apr 2016 12:22:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1apI7e-0004Oe-7o for bug-gnu-emacs@gnu.org; Sun, 10 Apr 2016 12:22:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:45070) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1apI7e-0004OO-4b for bug-gnu-emacs@gnu.org; Sun, 10 Apr 2016 12:22:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1apI7e-0005Y4-0l for bug-gnu-emacs@gnu.org; Sun, 10 Apr 2016 12:22:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 10 Apr 2016 16:22:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23258 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 23258-submit@debbugs.gnu.org id=B23258.146030531921320 (code B ref 23258); Sun, 10 Apr 2016 16:22:01 +0000 Original-Received: (at 23258) by debbugs.gnu.org; 10 Apr 2016 16:21:59 +0000 Original-Received: from localhost ([127.0.0.1]:57407 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1apI7b-0005Xo-E4 for submit@debbugs.gnu.org; Sun, 10 Apr 2016 12:21:59 -0400 Original-Received: from userp1040.oracle.com ([156.151.31.81]:39792) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1apI7Y-0005Xa-WB for 23258@debbugs.gnu.org; Sun, 10 Apr 2016 12:21:57 -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 u3AGLoVv014778 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 10 Apr 2016 16:21:50 GMT Original-Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0021.oracle.com (8.13.8/8.13.8) with ESMTP id u3AGLo2f019732 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 10 Apr 2016 16:21:50 GMT Original-Received: from abhmp0001.oracle.com (abhmp0001.oracle.com [141.146.116.7]) by aserv0121.oracle.com (8.13.8/8.13.8) with ESMTP id u3AGLna2027499; Sun, 10 Apr 2016 16:21:49 GMT In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6744.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:116325 Archived-At: > The docstring for with-eval-after-load gives only a cursory description > of the FILE argument. The docstring of the wrapped function eval-after- > load, however, is much more comprehensive. It should either be included > in the docstring of with-eval-after-load, or the docstring for with-eval- > after-load should refer the reader to eval-after-load for further > details. (The latter option is far better, IMO.) >=20 > As evidence of the harm done by the incomplete documentation, I offer > this link: >=20 > http://emacs.stackexchange.com/q/21540/962 +1 (Thank you, Harald.) Let me add a bit about this doc. AFAICT, there was no great need for creating this macro (and essentially telling users to prefer it over function `eval-after-load'). The "need" seems to have been only the fact that some users were not quoting arguments that they did not want to have evaluated. But having done that, whoever did it seems to have dropped the ball wrt documenting it. At the least, its doc should refer to `eval-after-load' (and vice versa presumably). As for the changes that were made to the doc string of `eval-after-load' at the same time: 1. This mystery sentence was added - at the very top, no less: This function has a compiler macro. I had to search the source code to find out what that is meant to mean - means for a function to have a "compiler macro", and even what a "compiler macro" is. And having found property `compiler-macro' used in the source code, I had to search the Elisp manual for that (there is no index entry for it). Finally, I found some light in node `Declare Form'. It cannot be clear to readers of `C-h f eval-after-load' what that mystery sentence is for. If we are going to include mention of this we should use English to get across the real point, which is presumably to say that a call to the function might be expanded by the compiler in different ways. I admit that I still do not understand why we would tell users this in `C-h f' output. And perhaps I still do not fully grasp the message. What seems clear to me is that most users will have NO CLUE what this mystery sentence (again, at the top of the help output, no less) is trying to tell them, much less why it is (or isn't) important. 2. FORM can now be a function, and what it can be is described before the description of what FILE can be. These are out of order. (OK, not very important.) As for the doc in the Elisp manual: `eval-after-load' is no longer even mentioned, except for these nodes: (1) `Hooks for Loading`, (2) `Coding Conventions', and (3) `Named Features'. The doc should be cleaned up to be coherent. And (IMHO) it _should_ document `eval-after-load' - far more important than documenting `with-eval-after-load'. Mentioning the latter does not replace describing the former. 1. Node `Hooks for Loading` says: Normally, well-designed Lisp programs should not use =E2=80=98eval-after-load=E2=80=99.... Perhaps it meant to say `with-eval-after-load' here? If not, why not? 2. Node `Coding Conventions' says: Avoid using =E2=80=98eval-after-load=E2=80=99 in libraries and package= s (*note Hooks for Loading::). This feature is meant for personal customizations; using it in a Lisp program is unclean... Again, why only `eval-after-load' for such a caution, and not (also) `with-eval-after-load'? 3. Node `Named Features' says: The direct effect of calling =E2=80=98provide=E2=80=99 is if not alrea= dy in FEATURES then to add FEATURE to the front of that list and call any =E2=80=98eval-after-load=E2=80=99 code waiting for it (*n= ote Hooks for Loading::). Now clearly it is correct to speak of `eval-after-load' here, and not `with-eval-after-load'. But is the same not true pretty much everywhere? Ultimately, the _behavior_ is that of `eval-after-load' - `with-eval-after-load' is only a wrapper. Finally, the Emacs manual makes no reference to either the macro or the function, except for this, in node `Foldout': To use the Foldout package, you can type =E2=80=98M-x load-library foldout =E2=80=99; or you can arrange for to do that automatically by putting the following in your init file: (eval-after-load "outline" '(require 'foldout)) Is that mention appropriate, or should it be removed? What's so special about library `foldout.el' in this regard?