branch: externals/ebdb
commit e50a437d55bf8c8f3d840a4f55d13e0597c71596
Author: Eric Abrahamsen <[email protected]>
Commit: Eric Abrahamsen <[email protected]>

    When unloading, don't remove records from the db's record slot
    
    This probably will help with #11
    
    * ebdb.el (ebdb-db-unload): Records should not be removed from the
      db's 'record slot, that will result in them getting deleted
      altogether!  Just use `ebdb-delete-record' to get them out of the
      secondary data structures, then remove the db from `ebdb-db-list'.
---
 ebdb.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ebdb.el b/ebdb.el
index 89e29d5..a2122fb 100644
--- a/ebdb.el
+++ b/ebdb.el
@@ -2877,8 +2877,8 @@ that doesn't belong to a different database."
     ;; databases.
     (if (= 1 (length (slot-value (ebdb-record-cache r) 'database)))
        (ebdb-delete-record r db t)
-      (object-remove-from-list (ebdb-record-cache r) 'database db))
-    (object-remove-from-list db 'records r)))
+      (object-remove-from-list (ebdb-record-cache r) 'database db)))
+  (setq ebdb-db-list (cl-remove db ebdb-db-list)))
 
 (defun ebdb-db-reload (db)
   (ebdb-db-unload db)

Reply via email to