[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ebdb dbd3559 042/350: Do away with ebdb-seen-uuids
From: |
Eric Abrahamsen |
Subject: |
[elpa] externals/ebdb dbd3559 042/350: Do away with ebdb-seen-uuids |
Date: |
Mon, 14 Aug 2017 11:45:59 -0400 (EDT) |
branch: externals/ebdb
commit dbd3559c962129cdd3cd83f16aca47a3f191d765
Author: Eric Abrahamsen <address@hidden>
Commit: Eric Abrahamsen <address@hidden>
Do away with ebdb-seen-uuids
Now that we're hashing uuids in the load process, this variable isn't
necessary at all.
* ebdb.el (ebdb-delete-record): Don't need to remove the uuid here.
(ebdb-check-uuid): Just use the hashtable.
(ebdb-clear-vars): Remove from variables that need to be cleared.
---
ebdb.el | 15 +++++----------
1 file changed, 5 insertions(+), 10 deletions(-)
diff --git a/ebdb.el b/ebdb.el
index 2846f26..89e29d5 100644
--- a/ebdb.el
+++ b/ebdb.el
@@ -76,9 +76,6 @@
(defvar ebdb-record-tracker nil
"A list of all the loaded records")
-(defvar ebdb-seen-uuids nil
- "A list of all previously-loaded UUIDs.")
-
(defvar ebdb-hashtable (make-hash-table :test 'equal)
"Hash table for EBDB records.
Hashes the fields first-last-name, last-first-name, organization, aka,
@@ -1752,8 +1749,6 @@ altogether.")
(unless db
(dolist (db dbs)
(ebdb-db-remove-record db record)))
- (setq ebdb-seen-uuids
- (delete uuid ebdb-seen-uuids))
(dolist (field (slot-value record 'fields))
(ebdb-delete-field field record unload))
(ebdb-remhash uuid record)
@@ -2609,9 +2604,10 @@ instances to add as part of the role."
(defun ebdb-check-uuid (uuid)
"Ensure that UUID hasn't been seen before. If it has, raise an
error containing the record that already has that uuid."
- (when (member uuid ebdb-seen-uuids)
- (signal 'ebdb-duplicate-uuid
- (list (ebdb-gethash uuid 'uuid)))))
+ (let ((dup (ebdb-gethash uuid 'uuid)))
+ (when dup
+ (signal 'ebdb-duplicate-uuid
+ (list dup)))))
(defun ebdb-make-uuid (&optional prefix)
"Create and return a new UUID.
@@ -3155,8 +3151,7 @@ the persistent save, or allow them to propagate."
(defun ebdb-clear-vars ()
"Set all internal EBDB vars to nil."
(setq ebdb-db-list nil
- ebdb-record-tracker nil
- ebdb-seen-uuids nil)
+ ebdb-record-tracker nil)
(clrhash ebdb-org-hashtable)
(clrhash ebdb-hashtable))
- [elpa] externals/ebdb c803f1c 004/350: Forgot extra argument to ebdb-delete-i18n, (continued)
- [elpa] externals/ebdb c803f1c 004/350: Forgot extra argument to ebdb-delete-i18n, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 22734d1 019/350: Select newly-cloned buffers, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 94c7c6b 039/350: Provide ebdb-load guards in a few more places, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 015bd25 038/350: New search command ebdb-search-record-class, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb f288cba 034/350: Use "d" prefix for record/database move commands, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 7721bf3 044/350: Mess with autoloads, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 7126d5d 027/350: Hash record uuids during the loading process, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 60aea3d 045/350: ebdb-create-record: set record class outside of interactive call, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb e178321 051/350: Trailing code in last commit, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb c212316 014/350: First commit of buffer improvements, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb dbd3559 042/350: Do away with ebdb-seen-uuids,
Eric Abrahamsen <=
- [elpa] externals/ebdb 7570ed9 040/350: Protect against non-present records in role delete method, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb c44b910 056/350: New ebdb-copy-mail-as-kill command, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 10b0fa4 057/350: Use save-excursion in ebdb-toggle-all-record-marks, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb a2d2116 058/350: Use eieio-object-p instead of vectorp, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb a158434 055/350: Remove ebdb-browse-url, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb e50a437 043/350: When unloading, don't remove records from the db's record slot, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 5ce28dc 048/350: Remove ebdb-file-coding-system variable, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 886cfd0 054/350: Change gnorb tags field to plain org tags field, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 9a42885 061/350: ebdb-prompt-for-mail should return single mails with no prompt, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb e4f1cf5 046/350: Fix broken quoting for organization simple name reading, Eric Abrahamsen, 2017/08/14