summaryrefslogtreecommitdiff
path: root/cider-interaction.el
diff options
context:
space:
mode:
authorArtur Malabarba <bruce.connor.am@gmail.com>2016-02-07 02:39:36 +0000
committerArtur Malabarba <bruce.connor.am@gmail.com>2016-02-07 02:54:25 +0000
commit9a23cc33ffc31b5d2a8b98955b9bd161296c0abb (patch)
treeaf7679599051b044f88b9a595ca9562ed3174769 /cider-interaction.el
parent3aa5a351635aae79b234aebd94345eb8ccb62628 (diff)
[Fix #1540] Fix cider-complete-at-point
Diffstat (limited to 'cider-interaction.el')
-rw-r--r--cider-interaction.el15
1 files changed, 7 insertions, 8 deletions
diff --git a/cider-interaction.el b/cider-interaction.el
index ea481e1b..c1e9704b 100644
--- a/cider-interaction.el
+++ b/cider-interaction.el
@@ -541,16 +541,15 @@ The formatting is performed by `cider-annotate-completion-function'."
(defun cider-complete-at-point ()
"Complete the symbol at point."
- (when-let ((sap (cider-symbol-at-point)))
+ (when-let ((bounds (bounds-of-thing-at-point 'symbol)))
(when (and (cider-connected-p)
(not (or (cider-in-string-p) (cider-in-comment-p))))
- (let ((bounds (bounds-of-thing-at-point 'symbol)))
- (list (car bounds) (cdr bounds)
- (completion-table-dynamic #'cider-complete)
- :annotation-function #'cider-annotate-symbol
- :company-doc-buffer #'cider-create-doc-buffer
- :company-location #'cider-company-location
- :company-docsig #'cider-company-docsig)))))
+ (list (car bounds) (cdr bounds)
+ (completion-table-dynamic #'cider-complete)
+ :annotation-function #'cider-annotate-symbol
+ :company-doc-buffer #'cider-create-doc-buffer
+ :company-location #'cider-company-location
+ :company-docsig #'cider-company-docsig))))
(defun cider-company-location (var)
"Open VAR's definition in a buffer.