summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--geiser/doc.scm16
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