From 1369b62d71e06735a3e4d2b8349cfffe6de12a6c Mon Sep 17 00:00:00 2001 From: Jose Antonio Ortega Ruiz Date: Fri, 13 Feb 2009 00:54:26 +0100 Subject: Faster, asynchronous autodoc. --- scheme/guile/geiser/emacs.scm | 2 +- scheme/guile/geiser/introspection.scm | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'scheme/guile/geiser') diff --git a/scheme/guile/geiser/emacs.scm b/scheme/guile/geiser/emacs.scm index a3212af..79da237 100644 --- a/scheme/guile/geiser/emacs.scm +++ b/scheme/guile/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/scheme/guile/geiser/introspection.scm b/scheme/guile/geiser/introspection.scm index 38c0b79..efe9a09 100644 --- a/scheme/guile/geiser/introspection.scm +++ b/scheme/guile/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))) -- cgit v1.2.3