[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 50ee379 2/3: Fixed dictionary saving after initial load
From: |
Ian Dunn |
Subject: |
[elpa] master 50ee379 2/3: Fixed dictionary saving after initial load |
Date: |
Tue, 23 Jan 2018 21:07:29 -0500 (EST) |
branch: master
commit 50ee379c866e02dc0c36bb4bf45dd5b4cab0e90d
Author: Ian Dunn <address@hidden>
Commit: Ian Dunn <address@hidden>
Fixed dictionary saving after initial load
* paced.el (paced-dictionary-save):
(paced-save-named-dictionary):
(paced-save-all-dictionaries): Added force parameter.
(eieio-done-customizing): Use it.
* paced.org: Add Changelog entry
---
paced.el | 30 ++++++++++++---------
paced.info | 90 ++++++++++++++++++++++++++++++++++++++++++++------------------
paced.org | 11 ++++++++
3 files changed, 93 insertions(+), 38 deletions(-)
diff --git a/paced.el b/paced.el
index cf2bf29..6309cdb 100644
--- a/paced.el
+++ b/paced.el
@@ -7,7 +7,7 @@
;; Keywords: convenience, completion
;; Package-Requires: ((emacs "25.1") (async "1.9.1"))
;; URL: https://savannah.nongnu.org/projects/paced-el/
-;; Version: 1.0
+;; Version: 1.0.1
;; Created: 22 Jan 2017
;; Modified: 08 Dec 2017
@@ -391,19 +391,25 @@ be skipped."
(when dictionary
(paced-named-dictionary dictionary))))
-(cl-defmethod paced-dictionary-save ((dict paced-dictionary))
- "Save dictionary DICT according to its filename."
- (when (oref dict updated)
+(cl-defmethod paced-dictionary-save ((dict paced-dictionary) &optional force)
+ "Save dictionary DICT according to its filename.
+
+If FORCE is non-nil, ignore the `updated' flag in DICT and save
+it anyway."
+ (when (or force (oref dict updated))
(eieio-persistent-save dict))
(oset dict updated nil))
-(defun paced-save-named-dictionary (key)
- "Save dictionary named KEY."
+(defun paced-save-named-dictionary (key force)
+ "Save dictionary named KEY.
+
+If FORCE is non-nil (given with a prefix arg), forcibly save the
+dictionary if found."
(declare (interactive-only paced-dictionary-save))
- (interactive (list (paced-read-dictionary)))
+ (interactive (list (paced-read-dictionary) current-prefix-arg))
(paced-ensure-registered key)
(let ((dict (paced-named-dictionary key)))
- (paced-dictionary-save dict)))
+ (paced-dictionary-save dict force)))
(defun paced-load-dictionary-from-file (file)
"Load dictionary from FILE."
@@ -412,12 +418,12 @@ be skipped."
(when-let* ((new-dict (eieio-persistent-read file 'paced-dictionary)))
(paced-dictionary-register new-dict)))
-(defun paced-save-all-dictionaries ()
+(defun paced-save-all-dictionaries (&optional force)
"Save all registered dictionaries."
- (interactive)
+ (interactive "P")
(map-apply
(lambda (_ dict)
- (paced-dictionary-save dict))
+ (paced-dictionary-save dict force))
paced--registered-dictionaries))
;;;###autoload
@@ -440,7 +446,7 @@ be skipped."
(cl-defmethod eieio-done-customizing ((dict paced-dictionary))
(paced-dictionary-register dict)
(paced--ensure-dictionary-directory)
- (paced-dictionary-save dict))
+ (paced-dictionary-save dict t))
diff --git a/paced.info b/paced.info
index 84d3f86..1fb5c84 100644
--- a/paced.info
+++ b/paced.info
@@ -19,6 +19,7 @@ Paced
* Population Commands:: The good stuff
* Example Setups:: Some examples
* Contributing:: I wanna help!
+* Changelog:: List of changes by version
— The Detailed Node Listing —
@@ -60,6 +61,11 @@ Contributing
* Documentation:: Improving the documentation
* Working with EDE:: And all its quirks
+Changelog
+
+* 1.0.1: 101.
+* 1.0: 10.
+
File: paced.info, Node: Copying, Next: Introduction, Prev: Top, Up: Top
@@ -599,7 +605,7 @@ dedicated solutions for almost everything, but it makes an
excellent
fallback.
-File: paced.info, Node: Contributing, Prev: Example Setups, Up: Top
+File: paced.info, Node: Contributing, Next: Changelog, Prev: Example
Setups, Up: Top
Contributing
************
@@ -707,35 +713,67 @@ documentation; and misc for tests.
target. Consult with one of the paced devs for guidance, but usually
selecting “none” and letting one of us handle it is a good way to go.
+
+File: paced.info, Node: Changelog, Prev: Contributing, Up: Top
+
+Changelog
+*********
+
+* Menu:
+
+* 1.0.1: 101.
+* 1.0: 10.
+
+
+File: paced.info, Node: 101, Next: 10, Up: Changelog
+
+1.0.1
+=====
+
+Bug fix release
+ • Save dictionaries right after they’re created
+ • Added “force” parameter to save functions
+
+
+File: paced.info, Node: 10, Prev: 101, Up: Changelog
+
+1.0
+===
+
+Initial release.
+
Tag Table:
Node: Top228
-Node: Copying1675
-Node: Introduction2494
-Node: Similar Packages3614
-Node: pabbrev3900
-Node: predictive5043
-Node: Installation6091
-Node: Basic Setup6556
-Node: Dictionaries7159
-Node: Creating a Dictionary7563
-Node: Editing a Dictionary8603
-Node: Selective Dictionaries9079
-Node: Dictionary Files10728
-Node: Population Commands11819
-Node: Built-in Commands12755
-Node: Properties13552
-Node: Custom Commands14414
-Node: Asynchronous Population17141
-Node: Example Setups18334
-Node: Org Agenda Files18516
-Node: Project Files19772
-Node: Contributing20885
-Node: Bugs21641
-Node: Development22030
-Node: Documentation22997
-Node: Working with EDE23464
+Node: Copying1772
+Node: Introduction2591
+Node: Similar Packages3711
+Node: pabbrev3997
+Node: predictive5140
+Node: Installation6188
+Node: Basic Setup6653
+Node: Dictionaries7256
+Node: Creating a Dictionary7660
+Node: Editing a Dictionary8700
+Node: Selective Dictionaries9176
+Node: Dictionary Files10825
+Node: Population Commands11916
+Node: Built-in Commands12852
+Node: Properties13649
+Node: Custom Commands14511
+Node: Asynchronous Population17238
+Node: Example Setups18431
+Node: Org Agenda Files18613
+Node: Project Files19869
+Node: Contributing20982
+Node: Bugs21756
+Node: Development22145
+Node: Documentation23112
+Node: Working with EDE23579
+Node: Changelog24622
+Node: 10124747
+Node: 1024944
End Tag Table
diff --git a/paced.org b/paced.org
index 2bfce0f..c3c4596 100644
--- a/paced.org
+++ b/paced.org
@@ -569,3 +569,14 @@ autoloads; aux for auxiliary files such as documentation;
and misc for tests.
When creating a new file, EDE will ask if you want to add it to a target.
Consult with one of the paced devs for guidance, but usually selecting "none"
and letting one of us handle it is a good way to go.
+
+* Changelog
+:PROPERTIES:
+:DESCRIPTION: List of changes by version
+:END:
+** 1.0.1
+Bug fix release
+- Save dictionaries right after they're created
+- Added "force" parameter to save functions
+** 1.0
+Initial release.