summaryrefslogtreecommitdiff
path: root/scheme
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2009-02-10 15:12:31 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2009-02-10 15:12:31 +0100
commit710d1f8be59066f0b52d07b0f43343b3ab671ffa (patch)
treed5abfc54dc8ba242e7b020d471f57cd664baaf99 /scheme
parent8b2b6e02b5a7ceaf7b6f91dd302a42141c4ade8a (diff)
downloadgeiser-chez-710d1f8be59066f0b52d07b0f43343b3ab671ffa.tar.gz
geiser-chez-710d1f8be59066f0b52d07b0f43343b3ab671ffa.tar.bz2
Sort completion list in scheme's side.
Diffstat (limited to 'scheme')
-rw-r--r--scheme/geiser/introspection.scm11
1 files changed, 7 insertions, 4 deletions
diff --git a/scheme/geiser/introspection.scm b/scheme/geiser/introspection.scm
index 991b62d..4565464 100644
--- a/scheme/geiser/introspection.scm
+++ b/scheme/geiser/introspection.scm
@@ -44,9 +44,10 @@
(let* ((arity (program-arity program))
(arg-no (first arity))
(opt (> (second arity) 0))
- (args (map first (take (program-bindings program) arg-no)))
- (module (program-module program)))
- (format-args (if opt (drop-right args 1) args) (and opt (last args)) module)))
+ (args (map first (take (program-bindings program) arg-no))))
+ (format-args (if opt (drop-right args 1) args)
+ (and opt (last args))
+ (program-module program))))
(define (procedure-args proc)
(let* ((arity (procedure-property proc 'arity))
@@ -71,6 +72,8 @@
(cons 'module (if module (module-name module) '()))))
(define (completions prefix)
- (map symbol->string (apropos-internal (string-append "^" prefix))))
+ (sort! (map symbol->string
+ (apropos-internal (string-append "^" prefix)))
+ string<?))
;;; introspection.scm ends here