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

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

[elpa] master b736562 09/13: Keep properties for score change/calc


From: Dmitry Gutov
Subject: [elpa] master b736562 09/13: Keep properties for score change/calc
Date: Wed, 28 Jan 2015 13:09:09 +0000

branch: master
commit b736562a2727d90ba89242a650442220c82431e6
Author: Ingo Lohmar <address@hidden>
Commit: Ingo Lohmar <address@hidden>

    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



reply via email to

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