summaryrefslogtreecommitdiff
path: root/scheme
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2010-10-31 15:53:12 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2010-10-31 15:53:12 +0100
commitffd0a91a136909c4ed481184073e868ae886e230 (patch)
tree23dcbe372eaeee9c3029315254e41882a8026d42 /scheme
parent449a5c9a05feed4f743d98172f78b250c6258d7a (diff)
parent9325189d4b3cfa2207c015b4f60cf397089edc9f (diff)
downloadgeiser-chez-ffd0a91a136909c4ed481184073e868ae886e230.tar.gz
geiser-chez-ffd0a91a136909c4ed481184073e868ae886e230.tar.bz2
Merge branch 'master' into guile-meta
Diffstat (limited to 'scheme')
-rw-r--r--scheme/guile/geiser/doc.scm13
1 files changed, 7 insertions, 6 deletions
diff --git a/scheme/guile/geiser/doc.scm b/scheme/guile/geiser/doc.scm
index f5471b5..902f2a3 100644
--- a/scheme/guile/geiser/doc.scm
+++ b/scheme/guile/geiser/doc.scm
@@ -66,16 +66,17 @@
(else 'variable)))
(define (arguments proc)
- (define (p-arguments prog)
- (map (lambda (a) ((@@ (system vm program) arity->arguments-alist) prog a))
- (or (program-arities prog) '())))
+ (define (p-args prog)
+ (let ((as (map (lambda (a)
+ ((@@ (system vm program) arity->arguments-alist) prog a))
+ (or (program-arities prog) '()))))
+ (and (not (null? as)) as)))
(define (clist f) (lambda (x) (let ((y (f x))) (and y (list y)))))
(cond ((is-a? proc <generic>) (generic-args proc))
+ ((doc->args proc) => list)
((procedure-property proc 'arglist) => (clist arglist->args))
((procedure-source proc) => (clist source->args))
- ((doc->args proc) => list)
- ((program? proc) (let ((a (p-arguments proc)))
- (and (not (null? a)) a)))
+ ((and (program? proc) (p-args proc)))
((procedure-property proc 'arity) => (clist arity->args))
(else #f)))