summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--elisp/geiser-completion.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/elisp/geiser-completion.el b/elisp/geiser-completion.el
index 46413cf..f88fae6 100644
--- a/elisp/geiser-completion.el
+++ b/elisp/geiser-completion.el
@@ -228,9 +228,11 @@ 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)