summaryrefslogtreecommitdiff
path: root/elisp/geiser-completion.el
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2009-09-23 22:37:55 +0200
committerJose Antonio Ortega Ruiz <jao@gnu.org>2009-09-23 22:37:55 +0200
commitee5207a82722b0ac9d78db007bc13a6958f7930b (patch)
treede88cef0fa7ed417c08845e10415ed76234dbe0d /elisp/geiser-completion.el
parentb37bd6e4c858e04434976a8b9ebe420f58fab22f (diff)
downloadgeiser-ee5207a82722b0ac9d78db007bc13a6958f7930b.tar.gz
geiser-ee5207a82722b0ac9d78db007bc13a6958f7930b.tar.bz2
Slightly more efficient symbol completion.
Diffstat (limited to 'elisp/geiser-completion.el')
-rw-r--r--elisp/geiser-completion.el10
1 files changed, 5 insertions, 5 deletions
diff --git a/elisp/geiser-completion.el b/elisp/geiser-completion.el
index 0752e5c..60b288e 100644
--- a/elisp/geiser-completion.el
+++ b/elisp/geiser-completion.el
@@ -136,7 +136,8 @@ terminates a current completion."
(defun geiser-completion--symbol-list (prefix)
(delete-duplicates
- (append (mapcar (lambda (s) (format "%s" s)) (geiser-syntax--locals-around-point))
+ (append (all-completions prefix
+ (mapcar 'symbol-name (geiser-syntax--locals-around-point)))
(geiser-eval--send/result `(:eval ((:ge completions) ,prefix))))
:test 'string=))
@@ -150,10 +151,9 @@ terminates a current completion."
(completion-table-dynamic 'geiser-completion--module-list))
(defun geiser-completion--complete (prefix modules)
- (let* ((symbols (if modules (geiser-completion--module-list prefix)
- (geiser-completion--symbol-list prefix)))
- (completions (all-completions prefix symbols))
- (partial (try-completion prefix symbols))
+ (let* ((completions (if modules (geiser-completion--module-list prefix)
+ (geiser-completion--symbol-list prefix)))
+ (partial (try-completion prefix completions))
(partial (if (eq partial t) prefix partial)))
(cons completions partial)))