@@ -96,27 +96,21 @@ form, with symbol at point replaced by __prefix__."
96
96
" __prefix__"
97
97
(substring context (- pref-end expr-start)))))))
98
98
99
- (defvar cider-completion-last-context nil )
100
-
101
99
(defun cider-completion-get-context (&optional info )
102
100
" Extract context depending (maybe of INFO type).
103
101
104
102
Output depends on `cider-completion-use-context' and the current major mode."
105
- (let ((context (if cider-completion-use-context
106
- ; ; We use ignore-errors here since grabbing the context
107
- ; ; might fail because of unbalanced parens, or other
108
- ; ; technical reasons, yet we don't want to lose all
109
- ; ; completions and throw error to user because of that.
110
- (or (ignore-errors
111
- (if info
112
- (cider-completion-get-info-context-at-point)
113
- (cider-completion-get-context-at-point)))
114
- " nil" )
115
- " nil" )))
116
- (if (string= cider-completion-last-context context)
117
- " :same"
118
- (setq cider-completion-last-context context)
119
- context)))
103
+ (if cider-completion-use-context
104
+ ; ; We use ignore-errors here since grabbing the context
105
+ ; ; might fail because of unbalanced parens, or other
106
+ ; ; technical reasons, yet we don't want to lose all
107
+ ; ; completions and throw error to user because of that.
108
+ (or (ignore-errors
109
+ (if info
110
+ (cider-completion-get-info-context-at-point)
111
+ (cider-completion-get-context-at-point)))
112
+ " nil" )
113
+ " nil" ))
120
114
121
115
(provide 'cider-completion-context )
122
116
; ;; cider-completion-context.el ends here
0 commit comments