From 694539c048cdabc4b27ce7609022671fed5200f5 Mon Sep 17 00:00:00 2001 From: Jose Antonio Ortega Ruiz Date: Fri, 13 Nov 2009 00:07:54 +0100 Subject: Guile: bug fix: a macro-transformer is not a good arity info source. * scheme/guile/geiser/doc.scm (obj-args): producing always ... for macros. --- geiser/doc.scm | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'geiser') diff --git a/geiser/doc.scm b/geiser/doc.scm index b634c08..83bce66 100644 --- a/geiser/doc.scm +++ b/geiser/doc.scm @@ -55,7 +55,7 @@ (define (obj-args obj) (cond ((not obj) #f) ((or (procedure? obj) (program? obj)) (arguments obj)) - ((macro? obj) (or (obj-args (macro-transformer obj)) '((required ...)))) + ((macro? obj) '((required ...))) (else 'variable))) (define (arguments proc) @@ -79,8 +79,12 @@ (let ((req (car art)) (opt (cadr art)) (rest (caddr art))) - `(,@(if (> req 0) (list (cons 'required (gen-arg-names 1 req))) '()) - ,@(if (> opt 0) (list (cons 'optional (gen-arg-names (+ 1 req) opt))) '()) + `(,@(if (> req 0) + (list (cons 'required (gen-arg-names 1 req))) + '()) + ,@(if (> opt 0) + (list (cons 'optional (gen-arg-names (+ 1 req) opt))) + '()) ,@(if rest (list (cons 'rest 'rest)) '())))) (define (gen-arg-names fst count) -- cgit v1.2.3