diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2009-08-17 16:23:45 +0200 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2009-08-17 16:24:16 +0200 |
commit | 18db590dece0f88c3f2bd850a3158bb50605e2c6 (patch) | |
tree | abd90db428d4f6d2da5f2134b18b4a5bfd297df7 /scheme/guile/geiser | |
parent | 283e6f040449bb4f740991956007332c48308b38 (diff) | |
download | geiser-chez-18db590dece0f88c3f2bd850a3158bb50605e2c6.tar.gz geiser-chez-18db590dece0f88c3f2bd850a3158bb50605e2c6.tar.bz2 |
Well, i said that it was better, not that it was perfect.
Autodoc buglets and support for displaying module variables too.
Diffstat (limited to 'scheme/guile/geiser')
-rw-r--r-- | scheme/guile/geiser/doc.scm | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/scheme/guile/geiser/doc.scm b/scheme/guile/geiser/doc.scm index d951f1c..bc4acd9 100644 --- a/scheme/guile/geiser/doc.scm +++ b/scheme/guile/geiser/doc.scm @@ -37,6 +37,8 @@ #:use-module (oop goops) #:use-module (srfi srfi-1)) +(define *an-object* #t) + (define (autodoc ids) (if (not (list? ids)) '() @@ -59,17 +61,19 @@ ((list? args) args) (else (list args))))) `(,id - (required ,@(arglst 'required)) - (optional ,@(arglst 'optional) - ,@(let ((rest (assq-ref args 'rest))) - (if rest (list "...") '()))) - (key ,@(arglst 'keyword)))) + (args ,@(if (list? args) + `((required ,@(arglst 'required)) + (optional ,@(arglst 'optional) + ,@(let ((rest (assq-ref args 'rest))) + (if rest (list "...") '()))) + (key ,@(arglst 'keyword))) + '())))) (define (obj-args obj) (cond ((not obj) #f) ((or (procedure? obj) (program? obj)) (arguments obj)) ((macro? obj) (or (obj-args (macro-transformer obj)) '((required ...)))) - (else #f))) + (else 'variable))) (define (arguments proc) (cond |