[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ebdb 6b605a9 06/21: Hash records against their tag fiel
From: |
Eric Abrahamsen |
Subject: |
[elpa] externals/ebdb 6b605a9 06/21: Hash records against their tag field tags |
Date: |
Sun, 17 Sep 2017 15:32:46 -0400 (EDT) |
branch: externals/ebdb
commit 6b605a9e37d70161255f317028def1df2bba763e
Author: Eric Abrahamsen <address@hidden>
Commit: Eric Abrahamsen <address@hidden>
Hash records against their tag field tags
* ebdb.el (ebdb-init-field, ebdb-delete-field): The idea is that tags
should be usable for quick hashtable lookups.
---
ebdb.el | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/ebdb.el b/ebdb.el
index 3e4f42b..920ca5c 100644
--- a/ebdb.el
+++ b/ebdb.el
@@ -2340,10 +2340,15 @@ See `ebdb-url-valid-schemes' for a list of acceptable
schemes."
(seq-find (lambda (tg) (string-match-p tag tg))
(slot-value field 'tags)))
-(cl-defmethod ebdb-init-field ((field ebdb-field-tags) _record)
+(cl-defmethod ebdb-init-field ((field ebdb-field-tags) record)
(let ((tags (slot-value field 'tags)))
(dolist (tag tags)
- (add-to-list 'ebdb-tags tag))))
+ (add-to-list 'ebdb-tags tag)
+ (ebdb-puthash tag record))))
+
+(cl-defmethod ebdb-delete-field ((field ebdb-field-tags) &optional record
_unload)
+ (dolist (tag (slot-value field 'tags))
+ (ebdb-remhash tag record)))
;;; Fields that change EBDB's behavior.
- [elpa] externals/ebdb updated (cec392d -> c298037), Eric Abrahamsen, 2017/09/17
- [elpa] externals/ebdb 6b605a9 06/21: Hash records against their tag field tags,
Eric Abrahamsen <=
- [elpa] externals/ebdb 4206ccd 02/21: Don't unilaterally add to kill-emacs-hook, Eric Abrahamsen, 2017/09/17
- [elpa] externals/ebdb 3311fc7 10/21: Add a dir file for the Info manual, Eric Abrahamsen, 2017/09/17
- [elpa] externals/ebdb 62fcfcf 15/21: Add ebdb-save to write-contents-functions in EBDB buffers, Eric Abrahamsen, 2017/09/17
- [elpa] externals/ebdb a22c983 16/21: Try different faces in EBDB buffers, Eric Abrahamsen, 2017/09/17
- [elpa] externals/ebdb 13f680a 13/21: Part two of threaded version of ebdb-initialize, Eric Abrahamsen, 2017/09/17
- [elpa] externals/ebdb 3a918eb 09/21: Provide better instructions for BBDB migration, Eric Abrahamsen, 2017/09/17
- [elpa] externals/ebdb cbb4cc1 20/21: More complete error handling for field insertion, Eric Abrahamsen, 2017/09/17
- [elpa] externals/ebdb c298037 21/21: Bump version for 0.3.2, Eric Abrahamsen, 2017/09/17
- [elpa] externals/ebdb 18be9ad 04/21: Add ebdb-field-bank-account class, Eric Abrahamsen, 2017/09/17
- [elpa] externals/ebdb dc5d03e 01/21: Change behavior of ebdb-fmt-compose-field, Eric Abrahamsen, 2017/09/17