summaryrefslogtreecommitdiff
path: root/elisp/geiser-completion.el
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2010-11-09 21:52:56 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2010-11-09 21:52:56 +0100
commit27916d2da2e43f231daff12249b19701f5a27b4f (patch)
tree8425627764ba5a195a25665da5a2c62ce2f221bd /elisp/geiser-completion.el
parentd830e14a4010284b4085d9942bfd856b0360d793 (diff)
parentf2bf4b2cda05fe8c32ee74ce3b5cce743d81de61 (diff)
downloadgeiser-guile-27916d2da2e43f231daff12249b19701f5a27b4f.tar.gz
geiser-guile-27916d2da2e43f231daff12249b19701f5a27b4f.tar.bz2
Merge branch 'master' into guile-meta
Conflicts: elisp/geiser-guile.el
Diffstat (limited to 'elisp/geiser-completion.el')
-rw-r--r--elisp/geiser-completion.el11
1 files changed, 8 insertions, 3 deletions
diff --git a/elisp/geiser-completion.el b/elisp/geiser-completion.el
index d346190..f88fae6 100644
--- a/elisp/geiser-completion.el
+++ b/elisp/geiser-completion.el
@@ -228,14 +228,19 @@ we're looking for a module name.")
Perform completion similar to Emacs' complete-symbol.
With prefix, complete module name."
(interactive "P")
+ (unless (geiser-syntax--symbol-at-point)
+ (error "No symbol at point"))
(geiser--respecting-message "Retrieving completions...")
(let* ((prefix (geiser-completion--prefix arg))
- (result (geiser-completion--complete prefix arg))
+ (result (and prefix (geiser-completion--complete prefix arg)))
(completions (car result))
(partial (cdr result)))
(cond ((null completions)
- (geiser--respecting-message "Can't find completion for %S" prefix)
- (geiser-completion--restore-window-cfg))
+ (if (not arg)
+ (geiser-completion--complete-symbol t)
+ (geiser--respecting-message "Can't find completion for %S"
+ prefix)
+ (geiser-completion--restore-window-cfg)))
(t (insert-and-inherit (substring partial (length prefix)))
(cond ((= (length completions) 1)
(geiser--respecting-message "Sole completion")