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 | f52ac22eb1c09f7eae9d53d7d12d15edac56f942 (patch) | |
tree | 5459334afa5877ad2dfa9d82c3cf226ddd3a4af3 /elisp/geiser-completion.el | |
parent | 479493f40a1666cc7fb2de8f855badc7106b762b (diff) | |
download | geiser-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.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))) |