branch: externals/ebdb
commit 374919e2796d63cdd3fa3c2f28f9794fefee3953
Author: Eric Abrahamsen <[email protected]>
Commit: Eric Abrahamsen <[email protected]>
Fixes to proper name formatting, part III
* ebdb.el (ebdb-init-field): Get the variable names right.
(ebdb-delete-field): And reverse operations here.
Need to go on a new-code diet. Only tests for five days.
---
ebdb.el | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/ebdb.el b/ebdb.el
index a5b4244..0745252 100644
--- a/ebdb.el
+++ b/ebdb.el
@@ -908,18 +908,20 @@ first one."
;; Also hash against "first last", as an alternate search
;; strategy.
(ebdb-puthash fl record)
- (object-add-to-list (ebdb-record-cache record) 'alt-names lf)
- (object-add-to-list (ebdb-record-cache record) 'alt-names fl)))
+ (object-add-to-list (ebdb-record-cache record) 'alt-names lf-full)
+ (object-add-to-list (ebdb-record-cache record) 'alt-names fl-full)))
(cl-call-next-method))
(cl-defmethod ebdb-delete-field ((name ebdb-field-name-complex) &optional
record _unload)
(when record
- (let ((lf (ebdb-name-lf name))
+ (let ((lf-full (ebdb-name-lf name t))
+ (fl-full (ebdb-name-fl name t))
(fl (ebdb-name-fl name)))
- (ebdb-remhash lf record)
+ (ebdb-remhash lf-full record)
+ (ebdb-remhash fl-full record)
(ebdb-remhash fl record)
- (object-remove-from-list (ebdb-record-cache record) 'alt-names lf)
- (object-remove-from-list (ebdb-record-cache record) 'alt-names fl)))
+ (object-remove-from-list (ebdb-record-cache record) 'alt-names lf-full)
+ (object-remove-from-list (ebdb-record-cache record) 'alt-names fl-full)))
(cl-call-next-method))
(cl-defmethod ebdb-read ((class (subclass ebdb-field-name-complex)) &optional
slots obj)