summaryrefslogtreecommitdiff
path: root/lisp/net/eudc-export.el
diff options
context:
space:
mode:
authorThomas Fitzsimmons <fitzsim@fitzsim.org>2015-11-22 17:30:50 -0500
committerThomas Fitzsimmons <fitzsim@fitzsim.org>2015-11-22 20:56:22 -0500
commit43d2e55fc17336b33a1581adf60179ff07ad580c (patch)
tree9c99dd014cc974ca3d2032656dee12a5ad92e63d /lisp/net/eudc-export.el
parent40ed767ba0a35dbaeee6bdbd85a108d88a982b1a (diff)
downloademacs-43d2e55fc17336b33a1581adf60179ff07ad580c.tar.gz
Add BBDB 3 support for EUDC export
* eudc.el: Add bbdb-version defvar. (eudc--using-bbdb-3-or-newer-p): New function. * eudc-export.el (eudc-create-bbdb-record): Add support for bbdb-create-internal argument list changes introduced in BBDB 3. * eudcb-bbdb.el: Remove bbdb-version defvar. (eudc-bbdb-field): Call eudc--using-bbdb-3-or-newer-p. (Bug#21971)
Diffstat (limited to 'lisp/net/eudc-export.el')
-rw-r--r--lisp/net/eudc-export.el19
1 files changed, 13 insertions, 6 deletions
diff --git a/lisp/net/eudc-export.el b/lisp/net/eudc-export.el
index c60911ff0c5..a65f555f89e 100644
--- a/lisp/net/eudc-export.el
+++ b/lisp/net/eudc-export.el
@@ -86,12 +86,19 @@ If SILENT is non-nil then the created BBDB record is not displayed."
(cons (car mapping) value))))
conversion-alist)))
(setq bbdb-notes (delq nil bbdb-notes))
- (setq bbdb-record (bbdb-create-internal bbdb-name
- bbdb-company
- bbdb-net
- bbdb-address
- bbdb-phones
- bbdb-notes))
+ (setq bbdb-record (bbdb-create-internal
+ bbdb-name
+ ,@(when (eudc--using-bbdb-3-or-newer-p)
+ '(nil
+ nil))
+ bbdb-company
+ bbdb-net
+ ,@(if (eudc--using-bbdb-3-or-newer-p)
+ '(bbdb-phones
+ bbdb-address)
+ '(bbdb-address
+ bbdb-phones))
+ bbdb-notes))
(or silent
(bbdb-display-records (list bbdb-record))))))