GNU bug report logs - #13572
24.3.50; `describe-function' -> "This function has a compiler macro..."

Previous Next

Package: emacs;

Reported by: "Drew Adams" <drew.adams <at> oracle.com>

Date: Mon, 28 Jan 2013 02:40:02 UTC

Severity: minor

Merged with 15031

Found in version 24.3.50

Done: Artur Malabarba <bruce.connor.am <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


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

From: Jambunathan K <kjambunathan <at> gmail.com>
To: "Drew Adams" <drew.adams <at> oracle.com>
Cc: 13572 <at> debbugs.gnu.org
Subject: Re: bug#13572: 24.3.50;
	`describe-function' -> "This function has a compiler macro..."
Date: Mon, 28 Jan 2013 13:38:55 +0530
"Drew Adams" <drew.adams <at> oracle.com> writes:

>> this is a type predicate constructed
>> automatically for a register defstruct.
>> 
>> The doc needs to be improved for this kind of thing 
>> (automatically generated functions).
>
> I guess Common Lisp defstruct does not allow for a doc string for the generated
> predicate (unlike the case for slots, constructor functions, and the defstruct
> itself).
>
> It would be good if Emacs Lisp could automatically generate a minimal doc string
> for the predicate that at least referred to the structure.  Something like this:
>
>  "Type predicate for a NAME structure."
>
> where NAME is the defstruct name.
>
> I guess that would be a wishlist item, since this is not part of the CL spec.
>
> Apart from that, in this particular defstruct it would be good to at least add
> doc strings for those things that allow it.  A doc string for the defstruct
> itself is the least users could ask for.

+1

I ran in to the some confusion while looking at compile.el - constructs
like `compilation--message->loc' which are reported as compiler macros
(Part of the confusion may be because of my ignorance.  Only "macros"
that I know of is `defmacros')

,----
| (cl-defstruct (compilation--message
|             (:constructor nil)
|             (:copier nil)
|             ;; (:type list)                ;Old representation.
|             (:constructor compilation--make-message (loc type end-loc))
|             (:conc-name compilation--message->))
|   loc type end-loc)
`----

Enhanced docstring can educate ignorant people like me...
-- 




This bug report was last modified 10 years and 37 days ago.

Previous Next


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