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 | |
parent | 283e6f040449bb4f740991956007332c48308b38 (diff) | |
download | geiser-guile-18db590dece0f88c3f2bd850a3158bb50605e2c6.tar.gz geiser-guile-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')
-rw-r--r-- | scheme/guile/geiser/doc.scm | 16 | ||||
-rw-r--r-- | scheme/plt/geiser/autodoc.ss | 6 |
2 files changed, 12 insertions, 10 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 diff --git a/scheme/plt/geiser/autodoc.ss b/scheme/plt/geiser/autodoc.ss index 2fe3a83..c43f8c9 100644 --- a/scheme/plt/geiser/autodoc.ss +++ b/scheme/plt/geiser/autodoc.ss @@ -46,7 +46,7 @@ (and sgn `(,id (name . ,name) - ,@(format-signature sgn) + (args ,@(format-signature sgn)) (module . ,(module-path-name->name path))))))) (define (format-signature sign) @@ -64,9 +64,7 @@ (define (find-signature path name local-name) (let ((path (if (path? path) (path->string path) path))) - (hash-ref! (hash-ref! signatures - path - (lambda () (parse-signatures path))) + (hash-ref! (hash-ref! signatures path (lambda () (parse-signatures path))) name (lambda () (infer-signature local-name))))) |