;; External.
(declare-function bbdb-parse-phone-number "ext:bbdb-com"
(string &optional number-type))
+(declare-function bbdb-parse-phone "ext:bbdb-com" (string &optional style))
(declare-function bbdb-string-trim "ext:bbdb" (string))
+(defun eudc-bbdbify-company (&rest organizations)
+ "Return ORGANIZATIONS as a list compatible with BBDB."
+ organizations)
+
(defun eudc-bbdbify-phone (phone location)
"Parse PHONE into a vector compatible with BBDB.
PHONE is either a string supposedly containing a phone number or
((stringp phone)
(let (phone-list)
(condition-case err
- (setq phone-list (bbdb-parse-phone-number phone))
+ (setq phone-list (if (eudc--using-bbdb-3-or-newer-p)
+ (bbdb-parse-phone phone)
+ (bbdb-parse-phone-number phone)))
(error
(if (string= "phone number unparsable." (cadr err))
(if (not (y-or-n-p (format "BBDB claims %S to be unparsable--insert anyway? " phone)))
'((name . cn)
(net . mail)
(address . (eudc-bbdbify-address postaladdress "Address"))
- (phone . ((eudc-bbdbify-phone telephonenumber "Phone"))))
+ (phone . (eudc-bbdbify-phone telephonenumber "Phone"))
+ (company . (eudc-bbdbify-company o)))
"A mapping from BBDB to LDAP attributes.
This is a list of cons cells (BBDB-FIELD . SPEC-OR-LIST) where
BBDB-FIELD is the name of a field that must be defined in your BBDB