branch: master commit 226943f173e31fe3e38d287b6ee9a0540cc46427 Author: Dmitry Gutov <dgu...@yandex.ru> Commit: Dmitry Gutov <dgu...@yandex.ru>
Add a couple of clarifying comments --- company-capf.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/company-capf.el b/company-capf.el index e8b425b..c2bb884 100644 --- a/company-capf.el +++ b/company-capf.el @@ -32,6 +32,7 @@ (require 'company) (require 'cl-lib) +;; Amortizes several calls to a c-a-p-f from the same position. (defvar company--capf-cache nil) ;; FIXME: Provide a way to save this info once in Company itself @@ -39,7 +40,11 @@ (defvar-local company-capf--current-completion-data nil "Value last returned by `company-capf' when called with `candidates'. For most properties/actions, this is just what we need: the exact values -that accompanied the completion table that's currently is use.") +that accompanied the completion table that's currently is use. + +`company-capf', however, could be called at some different positions during +a completion session (most importantly, by `company-sort-by-occurrence'), +so we can't just use the preceding variable instead.") (defun company--capf-data () (let ((cache company--capf-cache))