[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ebdb 8393458: New option ebdb-vacuum-databases
From: |
Eric Abrahamsen |
Subject: |
[elpa] externals/ebdb 8393458: New option ebdb-vacuum-databases |
Date: |
Tue, 14 Nov 2017 17:44:46 -0500 (EST) |
branch: externals/ebdb
commit 8393458ad52249f87590fd02092322bb61a7cd2f
Author: Eric Abrahamsen <address@hidden>
Commit: Eric Abrahamsen <address@hidden>
New option ebdb-vacuum-databases
* ebdb.el (ebdb-vacuum-databases): In newer Emacs, allows removing
indentation from database files.
(ebdb-db-save): Consult and set eieio-print-indentation
appropriately.
---
ebdb.el | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/ebdb.el b/ebdb.el
index 137b582..6dca7b4 100644
--- a/ebdb.el
+++ b/ebdb.el
@@ -191,6 +191,17 @@ to errors or database corruption."
:group 'ebdb-eieio
:type 'boolean)
+;; Do not use this to prevent writing of object-names via
+;; `eieio-print-object-names', older Emacs will choke if it's not
+;; present.
+(defcustom ebdb-vacuum-databases t
+ "When non-nil, minimize the size of database files.
+This option only has an effect in Emacs>27. At present it
+prevents indentation from being written to the persistence files;
+in the future more shrinkage may be possible."
+ :group 'ebdb-eieio
+ :type 'boolean)
+
(defgroup ebdb nil
"The Insidious Big Brother Database."
:group 'news
@@ -3886,7 +3897,8 @@ the persistent save, or allow them to propagate.")
(cl-defmethod ebdb-db-save ((db ebdb-db) &optional _prompt force)
"Mark DB and all its records as \"clean\" after saving."
- (let ((recs (ebdb-dirty-records (slot-value db 'records))))
+ (let ((recs (ebdb-dirty-records (slot-value db 'records)))
+ (eieio-print-indentation (null ebdb-vacuum-databases)))
(when (or force recs (slot-value db 'dirty))
(setf (slot-value db 'dirty) nil)
(dolist (r recs)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/ebdb 8393458: New option ebdb-vacuum-databases,
Eric Abrahamsen <=