emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master 226943f 10/40: Add a couple of clarifying comments


From: Dmitry Gutov
Subject: [elpa] master 226943f 10/40: Add a couple of clarifying comments
Date: Thu, 2 Jan 2020 18:57:01 -0500 (EST)

branch: master
commit 226943f173e31fe3e38d287b6ee9a0540cc46427
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>

    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))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]