From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#9115: 24.0.50; `documentation' should not return args list for CL defun*. Date: Wed, 03 Aug 2011 10:31:19 -0400 Message-ID: References: <87zkkcktst.fsf@gmail.com> <87tyaiiz2o.fsf@gmail.com> <87ipqgv16c.fsf@gmail.com> <87bow7r440.fsf@gmail.com> <8739hjr111.fsf@gmail.com> <87ty9zozbn.fsf@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1312381897 10694 80.91.229.12 (3 Aug 2011 14:31:37 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 3 Aug 2011 14:31:37 +0000 (UTC) Cc: 9115@debbugs.gnu.org To: Thierry Volpiatto Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Aug 03 16:31:33 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QocTs-0007IU-CN for geb-bug-gnu-emacs@m.gmane.org; Wed, 03 Aug 2011 16:31:32 +0200 Original-Received: from localhost ([::1]:53810 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QocTr-0000aR-Vv for geb-bug-gnu-emacs@m.gmane.org; Wed, 03 Aug 2011 10:31:31 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:52584) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QocTp-0000ZD-9B for bug-gnu-emacs@gnu.org; Wed, 03 Aug 2011 10:31:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QocTo-0003E7-1F for bug-gnu-emacs@gnu.org; Wed, 03 Aug 2011 10:31:29 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:43342) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QocTn-0003E1-Vs for bug-gnu-emacs@gnu.org; Wed, 03 Aug 2011 10:31:27 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1QocUL-0004gt-L9; Wed, 03 Aug 2011 10:32:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 03 Aug 2011 14:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9115 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 9115-submit@debbugs.gnu.org id=B9115.131238191718016 (code B ref 9115); Wed, 03 Aug 2011 14:32:01 +0000 Original-Received: (at 9115) by debbugs.gnu.org; 3 Aug 2011 14:31:57 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QocUG-0004gW-N4 for submit@debbugs.gnu.org; Wed, 03 Aug 2011 10:31:56 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.183] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QocUE-0004gK-Bu; Wed, 03 Aug 2011 10:31:54 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAI1bOU5FxKfe/2dsb2JhbABCp194gUABAQQBViMFCws0EhQYDSSHf8EIhkIEn0qEMQ X-IronPort-AV: E=Sophos;i="4.67,310,1309752000"; d="scan'208";a="128535224" Original-Received: from 69-196-167-222.dsl.teksavvy.com (HELO ceviche.home) ([69.196.167.222]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 03 Aug 2011 10:31:19 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 3072D660CF; Wed, 3 Aug 2011 10:31:19 -0400 (EDT) In-Reply-To: <87ty9zozbn.fsf@gmail.com> (Thierry Volpiatto's message of "Wed, 03 Aug 2011 07:10:04 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Wed, 03 Aug 2011 10:32:01 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-Received-From: 140.186.70.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:49875 Archived-At: severity 9115 wishlist retitle 9115 `documentation' should let you choose whether to include `usage' thanks >> (let* ((doc (documentation bidule)) >> (split (help-split-fundoc doc nil))) >> (if split (cdr split) doc)) > Yes, thanks, that's usable. > But it add unnecessary complications for same result, so for the moment > i will use my original code that is simpler and shorter. Yes, as mentioned earlier, I'm not particularly proud of the gymnastic you have to go through to get what you want. >> might work better. Still, you should be able to get the right code by >> reading the docstring and trying things out. > Docstring is hard to understand. > The term "usage" in docstring is not understandable until trying out the > function and see results after evaluation. Ah, I see the problem now. Would the patch below have helped? > Idem for "def" argument. Not sure how I can improve this part. Stefan === modified file 'lisp/help-fns.el' --- lisp/help-fns.el 2011-06-28 17:20:41 +0000 +++ lisp/help-fns.el 2011-08-03 14:29:40 +0000 @@ -102,7 +102,8 @@ (defun help-split-fundoc (docstring def) "Split a function DOCSTRING into the actual doc and the usage info. -Return (USAGE . DOC) or nil if there's no usage info. +Return (USAGE . DOC) or nil if there's no usage info, where USAGE info +is a string such as \"(apply FUNCTION &rest ARGUMENTS)\". DEF is the function whose usage we're looking for in DOCSTRING." ;; Functions can get the calling sequence at the end of the doc string. ;; In cases where `function' has been fset to a subr we can't search for