GNU bug report logs - #9115
`documentation' should let you choose whether to include `usage'

Previous Next

Package: emacs;

Reported by: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>

Date: Mon, 18 Jul 2011 06:06:02 UTC

Severity: wishlist

Found in version 24.0.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 9115 <at> debbugs.gnu.org
Subject: bug#9115: 24.0.50; `documentation' should not return args list for CL defun*.
Date: Wed, 03 Aug 2011 07:10:04 +0200
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

>>>>> (let ((doc (documentation bidule)))
>>>>> (or (cdr (help-split-fundoc doc nil)) doc))
>>>>> I agree this is not super convenient.
>>>> Yes, i think i have tried that, but it doesn't return nil for the case
>>>> of CL-style functions.
>>> 
>>> In Emacs-24, it returns nil if the function had no docstring (the CL or
>>> non-CL distinction is a only indirectly linked to the problem).  So the
>>> above should return either:
>>> - the full docstring if there's one.
>>> - nil or the empty string or "Not documented" if there isn't any
>>> docstring.
>> No, it doesn't, it return for example for: (I use emacs24)
>
> Oh, you're right:
>
>   (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.

> 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.
Idem for "def" argument.

Thanks for helping on that.

-- 
A+ Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997 




This bug report was last modified 5 years and 219 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.