[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 916d3d8 1/3: Only save when variables have been initialize
From: |
Ingo Lohmar |
Subject: |
[elpa] master 916d3d8 1/3: Only save when variables have been initialized |
Date: |
Fri, 06 Feb 2015 23:17:02 +0000 |
branch: master
commit 916d3d844e0623de7322dd5cc22b77928f51dfa0
Author: Ingo Lohmar <address@hidden>
Commit: Ingo Lohmar <address@hidden>
Only save when variables have been initialized
This should fix issues #3 and #4. When the library was loaded and emacs was
quit without company-statistics ever being enabled, we still saved the
uninitialized variables and loaded into an uninitialized state next time.
---
company-statistics.el | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/company-statistics.el b/company-statistics.el
index a3fef23..d0e96b0 100644
--- a/company-statistics.el
+++ b/company-statistics.el
@@ -4,7 +4,7 @@
;; Author: Ingo Lohmar <address@hidden>
;; URL: https://github.com/company-mode/company-statistics
-;; Version: 0.1
+;; Version: 0.1.1
;; Keywords: abbrev, convenience, matching
;; Package-Requires: ((emacs "24.3") (company "0.8.5"))
@@ -153,7 +153,8 @@ number)."
(write-file company-statistics-file)))
(defun company-statistics--maybe-save ()
- (when company-statistics-auto-save
+ (when (and (company-statistics--initialized-p)
+ company-statistics-auto-save)
(company-statistics--save)))
(defun company-statistics--load ()