diff options
author | Artur Malabarba <bruce.connor.am@gmail.com> | 2016-05-18 16:09:51 -0300 |
---|---|---|
committer | Artur Malabarba <bruce.connor.am@gmail.com> | 2016-05-18 16:11:41 -0300 |
commit | 0f78557a3e24e35b7f63e291b01b29ab165b9745 (patch) | |
tree | a81e70b83d354671e6882d65ecb87cea4ea97da2 /cider-eldoc.el | |
parent | f1f110274f7065cd8e91354b329f55fa27f6cec0 (diff) |
Don't query eldoc for symbol at point if not needed
Diffstat (limited to 'cider-eldoc.el')
-rw-r--r-- | cider-eldoc.el | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/cider-eldoc.el b/cider-eldoc.el index 38694fb1..ea00288d 100644 --- a/cider-eldoc.el +++ b/cider-eldoc.el @@ -277,10 +277,9 @@ Then go back to the point and return its eldoc." If `cider-eldoc-display-for-symbol-at-poin' is non-nil and the symbol at point has a valid eldoc available, return that. Otherwise return the eldoc of the first symbol of the sexp." - (let ((sym-at-point-eldoc-info (cider-eldoc-info-at-point))) - (if (and cider-eldoc-display-for-symbol-at-point sym-at-point-eldoc-info) - sym-at-point-eldoc-info - (cider-eldoc-info-at-sexp-beginning)))) + (or (when cider-eldoc-display-for-symbol-at-point + (cider-eldoc-info-at-point)) + (cider-eldoc-info-at-sexp-beginning))) (defun cider-eldoc--convert-ns-keywords (thing) "Convert THING values that match ns macro keywords to function names." |