[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 1ec2351 10/13: Fix default score calc function for missing
From: |
Dmitry Gutov |
Subject: |
[elpa] master 1ec2351 10/13: Fix default score calc function for missing global score |
Date: |
Wed, 28 Jan 2015 13:09:10 +0000 |
branch: master
commit 1ec23517326b504064756eec6ef47d3510c7861c
Author: Ingo Lohmar <address@hidden>
Commit: Ingo Lohmar <address@hidden>
Fix default score calc function for missing global score
---
company-statistics.el | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/company-statistics.el b/company-statistics.el
index 2d913b7..de9d51a 100644
--- a/company-statistics.el
+++ b/company-statistics.el
@@ -154,7 +154,8 @@ number)."
"Global score, and bonus for matching major mode and filename."
(let ((scores (gethash cand company-statistics--scores)))
(if scores
- (+ (cdr (assoc nil scores))
+ ;; cand may be in scores and still have no global score left
+ (+ (or (cdr (assoc nil scores)) 0)
(or (cdr (assoc major-mode scores)) 0)
(or (cdr (when buffer-file-name ;to not get nil context
(assoc buffer-file-name scores))) 0))
- [elpa] master bc3f1ec 02/13: Basic files, (continued)
- [elpa] master bc3f1ec 02/13: Basic files, Dmitry Gutov, 2015/01/28
- [elpa] master d131452 01/13: Initial commit, Dmitry Gutov, 2015/01/28
- [elpa] master e5553b5 07/13: Fix enabling mode without saved cache file, Dmitry Gutov, 2015/01/28
- [elpa] master b05124b 03/13: Sort candidates by previous completion choices, Dmitry Gutov, 2015/01/28
- [elpa] master 3babb6c 08/13: Pass de-propertized candidates to sorting, Dmitry Gutov, 2015/01/28
- [elpa] master 1c8bf18 04/13: Flexible context handling, refactoring, Dmitry Gutov, 2015/01/28
- [elpa] master b9bc7f0 05/13: Tests and stubs, Dmitry Gutov, 2015/01/28
- [elpa] master c9395db 06/13: First round of typos, Dmitry Gutov, 2015/01/28
- [elpa] master f8d15c7 12/13: Fix elpa URL in docs, Dmitry Gutov, 2015/01/28
- [elpa] master b736562 09/13: Keep properties for score change/calc, Dmitry Gutov, 2015/01/28
- [elpa] master 1ec2351 10/13: Fix default score calc function for missing global score,
Dmitry Gutov <=
- [elpa] master 7b9f171 11/13: Update metadata and documentation for ELPA, Dmitry Gutov, 2015/01/28
- [elpa] master 2452ff7 13/13: Add 'packages/company-statistics/' from commit 'f8d15c7edb2a182f484c5e6eb86f322df473e763', Dmitry Gutov, 2015/01/28