summaryrefslogtreecommitdiff
path: root/geiser
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2009-02-13 00:54:26 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2009-02-13 00:54:26 +0100
commit4a647eb328c1260c05d5ac9cdcc239086d07e51b (patch)
treebdb4abb850be9bddc79933df76afc679cb6f8427 /geiser
parentb20a784d45ac741443e2a2ed6f81178aab93ea63 (diff)
downloadgeiser-guile-4a647eb328c1260c05d5ac9cdcc239086d07e51b.tar.gz
geiser-guile-4a647eb328c1260c05d5ac9cdcc239086d07e51b.tar.bz2
Faster, asynchronous autodoc.
Diffstat (limited to 'geiser')
-rw-r--r--geiser/emacs.scm2
-rw-r--r--geiser/introspection.scm10
2 files changed, 9 insertions, 3 deletions
diff --git a/geiser/emacs.scm b/geiser/emacs.scm
index a3212af..79da237 100644
--- a/geiser/emacs.scm
+++ b/geiser/emacs.scm
@@ -25,7 +25,7 @@
;;; Code:
(define-module (geiser emacs)
- #:re-export (ge:proc-args
+ #:re-export (ge:arguments
ge:completions
ge:symbol-location
ge:compile-file
diff --git a/geiser/introspection.scm b/geiser/introspection.scm
index 38c0b79..efe9a09 100644
--- a/geiser/introspection.scm
+++ b/geiser/introspection.scm
@@ -25,11 +25,17 @@
;;; Code:
(define-module (geiser introspection)
- #:export (proc-args completions symbol-location)
+ #:export (arguments completions symbol-location)
#:use-module (system vm program)
#:use-module (ice-9 session)
#:use-module (srfi srfi-1))
+(define (arguments sym . syms)
+ (let loop ((sym sym) (syms syms))
+ (cond ((proc-args sym) => (lambda (args) (cons sym args)))
+ ((null? syms) #f)
+ (else (loop (car syms) (cdr syms))))))
+
(define (proc-args proc)
(obj-args (resolve-symbol proc)))
@@ -73,7 +79,7 @@
((pair? formals) (format-args (car formals)
(cdr formals)
(symbol-module name)))
- (else '()))))
+ (else #f))))
(define (macro-args macro)
(let ((prog (macro-transformer macro)))