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 | 12a6a2e7e41226393f41b8ff9cc02446c1931402 (patch) | |
tree | 0c7de0787bf042823e504ccd2555105ba6533b40 /geiser/doc.scm | |
parent | 4e1d945d26deb751fce01a8be4a55a6934691f96 (diff) | |
download | geiser-guile-12a6a2e7e41226393f41b8ff9cc02446c1931402.tar.gz geiser-guile-12a6a2e7e41226393f41b8ff9cc02446c1931402.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 'geiser/doc.scm')
-rw-r--r-- | geiser/doc.scm | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/geiser/doc.scm b/geiser/doc.scm index d951f1c..bc4acd9 100644 --- a/geiser/doc.scm +++ b/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 |