branch: master commit b736562a2727d90ba89242a650442220c82431e6 Author: Ingo Lohmar <i.loh...@gmail.com> Commit: Ingo Lohmar <i.loh...@gmail.com>
Keep properties for score change/calc - no need to remove them - might be useful information --- company-statistics.el | 10 ++++------ 1 files changed, 4 insertions(+), 6 deletions(-) diff --git a/company-statistics.el b/company-statistics.el index 48dc3d2..2d913b7 100644 --- a/company-statistics.el +++ b/company-statistics.el @@ -221,8 +221,8 @@ one. ALIST structure and cdrs may be changed!" (defun company-statistics--finished (result) "After completion, update scores and log." - (let* ((result (substring-no-properties result)) - (score-updates (funcall company-statistics-score-change result))) + (let* ((score-updates (funcall company-statistics-score-change result)) + (result (substring-no-properties result))) (company-statistics--scores-add result score-updates) (company-statistics--log-revert) (company-statistics--log-store result score-updates))) @@ -233,10 +233,8 @@ changed for candidates distinguishable by score." (setq candidates (sort candidates (lambda (cand1 cand2) - (> (funcall company-statistics-score-calc - (substring-no-properties cand1)) - (funcall company-statistics-score-calc - (substring-no-properties cand2))))))) + (> (funcall company-statistics-score-calc cand1) + (funcall company-statistics-score-calc cand2)))))) ;;;###autoload (define-minor-mode company-statistics-mode