]> git.eshelyaron.com Git - emacs.git/commitdiff
EUDC: Port eudc-export.el to BBDB >= 3
authorThomas Fitzsimmons <fitzsim@fitzsim.org>
Wed, 22 Nov 2017 00:50:29 +0000 (19:50 -0500)
committerThomas Fitzsimmons <fitzsim@fitzsim.org>
Wed, 22 Nov 2017 00:50:29 +0000 (19:50 -0500)
* lisp/net/eudc-export.el (eudc-create-bbdb-record): Only
support BBDB >= 3 arguments to `bbdb-create-internal' call.
(eudc-bbdbify-phone): Only call BBDB >= 3 bbdb-parse-phone
function.

lisp/net/eudc-export.el

index 77f6ddf0edac94e9892d7d97434cb1fa071ba2c2..ab3bc06ec92a49a96d3276db9b18805c66ee01b8 100644 (file)
@@ -98,16 +98,12 @@ If SILENT is non-nil then the created BBDB record is not displayed."
       (setq bbdb-notes (delq nil bbdb-notes))
       (setq bbdb-record (bbdb-create-internal
                         bbdb-name
-                        ,@(when (eudc--using-bbdb-3-or-newer-p)
-                            '(nil
-                              nil))
+                        nil
+                        nil
                         bbdb-company
                         bbdb-net
-                        ,@(if (eudc--using-bbdb-3-or-newer-p)
-                              '(bbdb-phones
-                                bbdb-address)
-                            '(bbdb-address
-                              bbdb-phones))
+                        bbdb-phones
+                        bbdb-address
                         bbdb-notes))
       (or silent
          (bbdb-display-records (list bbdb-record))))))
@@ -195,9 +191,7 @@ LOCATION is used as the phone location for BBDB."
    ((stringp phone)
     (let (phone-list)
       (condition-case err
-         (setq phone-list (if (eudc--using-bbdb-3-or-newer-p)
-                              (bbdb-parse-phone phone)
-                            (bbdb-parse-phone-number phone)))
+         (setq phone-list (bbdb-parse-phone phone))
        (error
         (if (string= "phone number unparsable." (cadr err))
             (if (not (y-or-n-p