summaryrefslogtreecommitdiff
path: root/scheme/guile
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
commitaf8cd551c9ed6cac332fcb4cfa17c5143b9d48a5 (patch)
tree35c9c19d2cc540f7e4e65d6a914a6c4406cc043b /scheme/guile
parent3d67d9292879f4c5ff50c7326091192293419630 (diff)
downloadgeiser-guile-af8cd551c9ed6cac332fcb4cfa17c5143b9d48a5.tar.gz
geiser-guile-af8cd551c9ed6cac332fcb4cfa17c5143b9d48a5.tar.bz2
Autodoc: fix for improper macro arglists scanning
Diffstat (limited to 'scheme/guile')
-rw-r--r--scheme/guile/geiser/doc.scm12
1 files changed, 7 insertions, 5 deletions
diff --git a/scheme/guile/geiser/doc.scm b/scheme/guile/geiser/doc.scm
index 4722238..f5471b5 100644
--- a/scheme/guile/geiser/doc.scm
+++ b/scheme/guile/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)