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
commitfb5f7a2a797183e5b2350ae76ea8ca09689f4a12 (patch)
treedb177f6a69f8682141ddbb22aa6988f23bd66f8b /elisp/geiser-completion.el
parent70b6d7a95f3c4e706b72568e2a29de2391fe09e2 (diff)
parenta7ad5704722b7fab966ac8fb4e6b62fe2e424756 (diff)
downloadgeiser-fb5f7a2a797183e5b2350ae76ea8ca09689f4a12.tar.gz
geiser-fb5f7a2a797183e5b2350ae76ea8ca09689f4a12.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")