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
commitee5b403d2d99ed6722063040a5328cf351b20144 (patch)
treedf66ca1510f3f95a399e20c12753c8e1e75f7ad2 /elisp/geiser-completion.el
parented48236fe7c336924ff4694275555649e9b269b5 (diff)
downloadgeiser-chez-ee5b403d2d99ed6722063040a5328cf351b20144.tar.gz
geiser-chez-ee5b403d2d99ed6722063040a5328cf351b20144.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)))