summaryrefslogtreecommitdiff
path: root/elisp/geiser-completion.el
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2009-08-25 01:58:55 +0200
committerJose Antonio Ortega Ruiz <jao@gnu.org>2009-08-25 01:58:55 +0200
commitf52ac22eb1c09f7eae9d53d7d12d15edac56f942 (patch)
tree5459334afa5877ad2dfa9d82c3cf226ddd3a4af3 /elisp/geiser-completion.el
parent479493f40a1666cc7fb2de8f855badc7106b762b (diff)
downloadgeiser-chez-f52ac22eb1c09f7eae9d53d7d12d15edac56f942.tar.gz
geiser-chez-f52ac22eb1c09f7eae9d53d7d12d15edac56f942.tar.bz2
Now this is cool: support for company 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)))