diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2009-08-25 01:58:55 +0200 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2009-08-25 01:58:55 +0200 |
commit | 91841a63fb0cf3c8a0a6ed1e9086b72097cd44e4 (patch) | |
tree | cc22f354204c9e912f1dc7e39f40f933ce51ab1c /elisp/geiser-completion.el | |
parent | e0dd77a67b8e7c7d2d56aa353967249cc1e19f1e (diff) | |
download | geiser-91841a63fb0cf3c8a0a6ed1e9086b72097cd44e4.tar.gz geiser-91841a63fb0cf3c8a0a6ed1e9086b72097cd44e4.tar.bz2 |
Now this is cool: support for company mode.
Diffstat (limited to 'elisp/geiser-completion.el')
-rw-r--r-- | elisp/geiser-completion.el | 8 |
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))) |