diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2010-10-31 15:13:19 +0100 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2010-10-31 15:13:19 +0100 |
commit | 04fd67faa12cb2212dbd6004889fa59aa52a650d (patch) | |
tree | 4b0f9339ff781161b2f932a315e155c4f58560db | |
parent | 384d21f43db11f8c3072c9bb99b75e6341e23691 (diff) | |
download | geiser-guile-04fd67faa12cb2212dbd6004889fa59aa52a650d.tar.gz geiser-guile-04fd67faa12cb2212dbd6004889fa59aa52a650d.tar.bz2 |
Always fallback to edit-module in M-.
-rw-r--r-- | geiser/doc.scm | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/geiser/doc.scm b/geiser/doc.scm index f5471b5..902f2a3 100644 --- a/geiser/doc.scm +++ b/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))) |