@@ -96,27 +96,21 @@ form, with symbol at point replaced by __prefix__."
9696 " __prefix__"
9797 (substring context (- pref-end expr-start)))))))
9898
99- (defvar cider-completion-last-context nil )
100-
10199(defun cider-completion-get-context (&optional info )
102100 " Extract context depending (maybe of INFO type).
103101
104102Output 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" ))
120114
121115(provide 'cider-completion-context )
122116; ;; cider-completion-context.el ends here
0 commit comments