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


Message #35 received at 9115 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
Cc: 9115 <at> debbugs.gnu.org
Subject: Re: bug#9115: 24.0.50; `documentation' should not return args list for
	CL defun*.
Date: Tue, 02 Aug 2011 15:16:19 -0400
> (defun* foo (&rest args) nil)
> (help-split-fundoc (documentation 'foo) nil)
> =>("(nil &rest ARGS)")

> (defun bar (&rest args) nil)
> (help-split-fundoc (documentation 'bar) nil)
> =>nil

> (defmacro foo-1 (&rest args) "some doc." nil)
> (help-split-fundoc (documentation 'foo-1) nil)
> nil

Right, as explained in help-split-fundoc's docstring:

   Return (USAGE . DOC) or nil if there's no usage info.

So if you just want the docstring, you'll need something like

  (let ((doc (documentation bidule)))
    (or (cdr (help-split-fundoc doc nil)) doc))

I agree this is not super convenient.


        Stefan




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.