From ee5207a82722b0ac9d78db007bc13a6958f7930b Mon Sep 17 00:00:00 2001 From: Jose Antonio Ortega Ruiz Date: Wed, 23 Sep 2009 22:37:55 +0200 Subject: Slightly more efficient symbol completion. --- elisp/geiser-completion.el | 10 +++++----- 1 file 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))) -- cgit v1.2.3