From 3b849eb2312f5ecc0ecb5a20fe574f8f69d4deb4 Mon Sep 17 00:00:00 2001 From: Jose Antonio Ortega Ruiz Date: Sun, 27 Sep 2009 00:29:28 +0200 Subject: PLT: autodoc arg names scanning: better case-lambda, syntax-rules added. --- scheme/plt/geiser/autodoc.ss | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'scheme/plt/geiser') diff --git a/scheme/plt/geiser/autodoc.ss b/scheme/plt/geiser/autodoc.ss index c349f6e..7fbdb0c 100644 --- a/scheme/plt/geiser/autodoc.ss +++ b/scheme/plt/geiser/autodoc.ss @@ -32,7 +32,7 @@ (name (car loc)) (path (cdr loc)) (sgns (and path (find-signatures path name id))) - (sgns (if (list? sgns) sgns '()))) + (sgns (and sgns (if (list? sgns) sgns '())))) (and sgns `(,id (name . ,name) @@ -83,14 +83,18 @@ (add-signature! name formals store)) ((list 'define name (list 'lambda formals body ...)) (add-signature! name formals store)) - ((list 'define name (list 'case-lambda forms ...)) - (for-each (lambda (f) (parse-datum! (list 'define name (cons 'lambda f)))) forms)) + ((list 'define name (list 'case-lambda clauses ...)) + (for-each (lambda (c) (add-signature! name (car c) store)) (reverse clauses))) ((list 'define-for-syntax (list name formals ...) body ...) (add-signature! name formals store)) ((list 'define-for-syntax name (list 'lambda formals body ...)) (add-signature! name formals store)) ((list 'define-syntax-rule (list name formals ...) body ...) (add-signature! name formals store)) + ((list 'define-syntax name (list 'syntax-rules specials clauses ...)) + (for-each (lambda (c) + (add-signature! name (cdar c) store)) + (reverse clauses))) (_ void))) (define (add-signature! name formals store) -- cgit v1.2.3