From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Lennart Borgman (gmail)" Newsgroups: gmane.emacs.devel Subject: Re: Suggestion: Let the help command load autoloaded functions etc Date: Fri, 21 Dec 2007 18:35:43 +0100 Message-ID: <476BF96F.6000109@gmail.com> References: <47696238.6050601@gmail.com> <476B7BA6.80903@gmail.com> <476B990A.80602@gnu.org> <476BE7C7.2020005@gmail.com> <476BED2D.2070700@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1198258569 19757 80.91.229.12 (21 Dec 2007 17:36:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 21 Dec 2007 17:36:09 +0000 (UTC) Cc: rms@gnu.org, emacs-devel@gnu.org To: Jason Rumney Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Dec 21 18:36:22 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1J5lnH-00080r-Tg for ged-emacs-devel@m.gmane.org; Fri, 21 Dec 2007 18:36:20 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J5lmx-0007vj-V7 for ged-emacs-devel@m.gmane.org; Fri, 21 Dec 2007 12:36:00 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1J5lmu-0007vV-8I for emacs-devel@gnu.org; Fri, 21 Dec 2007 12:35:56 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1J5lmt-0007vJ-34 for emacs-devel@gnu.org; Fri, 21 Dec 2007 12:35:55 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J5lms-0007vG-W9 for emacs-devel@gnu.org; Fri, 21 Dec 2007 12:35:55 -0500 Original-Received: from ch-smtp02.sth.basefarm.net ([80.76.149.213]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1J5lmk-00009D-B5; Fri, 21 Dec 2007 12:35:46 -0500 Original-Received: from c83-254-148-228.bredband.comhem.se ([83.254.148.228]:60131 helo=[127.0.0.1]) by ch-smtp02.sth.basefarm.net with esmtp (Exim 4.68) (envelope-from ) id 1J5lmh-0005It-7V; Fri, 21 Dec 2007 18:35:43 +0100 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666 In-Reply-To: <476BED2D.2070700@gnu.org> X-Antivirus: avast! (VPS 071220-0, 2007-12-20), Outbound message X-Antivirus-Status: Clean X-Originating-IP: 83.254.148.228 X-Scan-Result: No virus found in message 1J5lmh-0005It-7V. X-Scan-Signature: ch-smtp02.sth.basefarm.net 1J5lmh-0005It-7V f27814af953e300a95583640ad633ae0 X-detected-kernel: by monty-python.gnu.org: Linux 2.6? (barebone, rare!) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:85351 Archived-At: Jason Rumney wrote: > Lennart Borgman (gmail) wrote: >> Jason Rumney wrote: >>> What benefit do you suppose would be gained from doing this? >> A few things: >> >> - Argument list >> - Correct doc string >> - Links in doc string >> > > I don't see what you mean by the first two. When I use C-h f 5x5, for > example (without having loaded 5x5 previously), I see the arg list, and > the documentation is correct. Under what circumstances do you get > incorrect documentation and no arg list? Not sure, but it looks to me like it will be correct if you use ;;;###autoload before the function. However if you do something like (autoload '5x1 "5x1" "Play 5x1" t) you will just get what is on this line. I believe many people are writing autoload's the second way. Maybe something like this in autoload.el could be helpful: (defun generate-library-autoloads (library) "Insert at point autoloads for Emacs library LIBRARY. Works like `generate-file-autoloads', but for a library." (interactive (list (completing-read "Generate autoloads for library: " 'locate-file-completion (cons load-path (get-load-suffixes))))) (let ((file (locate-library library))) (generate-file-autoloads file))) But that does not cure the third problem, that links in autoloaded functions doc strings often does not work because they point to other things in the same yet not loaded library where the function is defined. I still believe me suggestion for a better [Args not available ...] string is useful. It could be expanded to the ;;;###autoload cookie case, maybe by adding something at the end of the description.