This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

make (oop goops describe) show docstrings


Keisuke Nishida <kxn30@po.cwru.edu> writes:

> Kalle Olavi Niemitalo <tosi@ees2.oulu.fi> writes:
> 
> > OW!  I spent the last few hours implementing a generic
> > `describe-object' with methods for procedures, macros and generic
> > functions... until I noticed GOOPS has had the functionality all
> > the time:
> 
> > I guess I'll use that instead... except `describe' doesn't show
> > documentation strings.  What would be the best way to add them?
> 
> I think we'd better modify the file goops/describe.scm so that it
> merges ice-9/doc.scm, though I'm not sure if GOOPS supports docstrings.

Methods can have them:

guile> (define-method (fool x) "Return x" x)
guile> (generic-function-methods fool)
(#<<method> (<top>) 40310490>)
guile> (procedure-documentation (method-procedure (car (generic-function-methods fool))))
"Return x"

> Once `describe' comes to display enough information, we can redirect
> the output to the Emacs buffer.
> 
> Maybe we should discuss this part in the guile mailing list.

Here we go...

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]