summaryrefslogtreecommitdiff
path: root/elisp/geiser-completion.el
diff options
context:
space:
mode:
Diffstat (limited to 'elisp/geiser-completion.el')
-rw-r--r--elisp/geiser-completion.el8
1 files changed, 5 insertions, 3 deletions
diff --git a/elisp/geiser-completion.el b/elisp/geiser-completion.el
index cd03cae..e3bd74b 100644
--- a/elisp/geiser-completion.el
+++ b/elisp/geiser-completion.el
@@ -204,14 +204,16 @@ terminates a current completion."
(funcall geiser-completion--symbol-begin-function module))
(save-excursion (skip-syntax-backward "^-()>") (point))))
+(defsubst geiser-completion--prefix (module)
+ (buffer-substring-no-properties (point)
+ (geiser-completion--symbol-begin module)))
+
(defun geiser-completion--complete-symbol (&optional arg)
"Complete the symbol at point.
Perform completion similar to Emacs' complete-symbol.
With prefix, complete module name."
(interactive "P")
- (let* ((end (point))
- (beg (geiser-completion--symbol-begin arg))
- (prefix (buffer-substring-no-properties beg end))
+ (let* ((prefix (geiser-completion--prefix arg))
(result (geiser-completion--complete prefix arg))
(completions (car result))
(partial (cdr result)))