GNU bug report logs -
#9115
`documentation' should let you choose whether to include `usage'
Previous Next
Full log
Message #44 received at 9115 <at> debbugs.gnu.org (full text, mbox):
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)
(defun* foo (&rest args) nil)
=> "nil (&rest args)"
and for most not documented CL-style functions:
=> "\n\n (args...)"
But neither nil, empty string or "not documented".
See comment in function i sent.
> So if you want the first line, just extract it from the output when it's
> not nil.
Problem it's not non--nil.(except for elisp function of course)
--
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.