summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2010-10-31 02:34:30 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2010-10-31 02:50:37 +0100
commit384d21f43db11f8c3072c9bb99b75e6341e23691 (patch)
tree15c241bc512a3e1411632004decf11de845655a9
parent5532387d8fe568c143d007d337cc74737680c2a5 (diff)
downloadgeiser-guile-384d21f43db11f8c3072c9bb99b75e6341e23691.tar.gz
geiser-guile-384d21f43db11f8c3072c9bb99b75e6341e23691.tar.bz2
Autodoc: fix for improper macro arglists scanning
-rw-r--r--geiser/doc.scm12
1 files changed, 7 insertions, 5 deletions
diff --git a/geiser/doc.scm b/geiser/doc.scm
index 4722238..f5471b5 100644
--- a/geiser/doc.scm
+++ b/geiser/doc.scm
@@ -87,12 +87,14 @@
(else #f))))
(define (macro-args tf)
+ (define* (collect args #:optional (req '()))
+ (cond ((null? args) (arglist->args `(,(reverse req) #f #f r #f)))
+ ((symbol? args) (arglist->args `(,(reverse req) #f #f r ,args)))
+ ((and (pair? args) (symbol? (car args)))
+ (collect (cdr args) (cons (car args) req)))
+ (else #f)))
(let* ((pats (procedure-property tf 'patterns))
- (args (and pats (filter identity
- (map (lambda (p)
- (and (every symbol? p)
- (list (cons 'required p))))
- pats)))))
+ (args (and pats (filter-map collect pats))))
(or (and args (not (null? args)) args) default-macro-args)))
(define (arity->args art)