summaryrefslogtreecommitdiff
path: root/elisp
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2009-05-11 01:22:49 +0200
committerJose Antonio Ortega Ruiz <jao@gnu.org>2009-05-11 01:22:49 +0200
commitc4bcaf2e939357c94b0bb7bc48c53abea7049e0a (patch)
tree5ed9f45ccc77c75e6fc658c7f58139d600396816 /elisp
parent923c12119ca6b43c17a5543fb162c85356682a52 (diff)
downloadgeiser-c4bcaf2e939357c94b0bb7bc48c53abea7049e0a.tar.gz
geiser-c4bcaf2e939357c94b0bb7bc48c53abea7049e0a.tar.bz2
Improvements to module name support (using prefixes) and Guile support.
Diffstat (limited to 'elisp')
-rw-r--r--elisp/geiser-completion.el17
1 files changed, 10 insertions, 7 deletions
diff --git a/elisp/geiser-completion.el b/elisp/geiser-completion.el
index d27ef0f..1e036c6 100644
--- a/elisp/geiser-completion.el
+++ b/elisp/geiser-completion.el
@@ -153,14 +153,17 @@ terminates a current completion."
(quote (:scm ,(or (geiser-syntax--get-partial-sexp) "()"))))))
:test 'string=))
-(defsubst geiser-completion--module-list ()
- (geiser-eval--send/result '(:eval ((:ge all-modules)))))
+(defsubst geiser-completion--module-list (prefix)
+ (geiser-eval--send/result `(:eval ((:ge module-completions) ,prefix))))
(defvar geiser-completion--symbol-list-func
(completion-table-dynamic 'geiser-completion--symbol-list))
+(defvar geiser-completion--module-list-func
+ (completion-table-dynamic 'geiser-completion--module-list))
+
(defun geiser-completion--complete (prefix modules)
- (let* ((symbols (if modules (geiser-completion--module-list)
+ (let* ((symbols (if modules (geiser-completion--module-list prefix)
(geiser-completion--symbol-list prefix)))
(completions (all-completions prefix symbols))
(partial (try-completion prefix symbols))
@@ -183,11 +186,11 @@ terminates a current completion."
(let ((minibuffer-local-completion-map geiser-completion--module-minibuffer-map))
(geiser-eval--get-module
(completing-read (or prompt "Module name: ")
- (geiser-completion--module-list)
- nil nil
+ geiser-completion--module-list-func
+ nil nil nil
+ (or history geiser-completion--module-history)
(or default
- (format "%s" (or (geiser-syntax--buffer-module) "(")))
- (or history geiser-completion--module-history)))))
+ (format "%s" (or (geiser-syntax--buffer-module) "")))))))
(defun geiser--respecting-message (format &rest format-args)
"Display TEXT as a message, without hiding any minibuffer contents."