diff options
| -rw-r--r-- | lisp/net/eudc-export.el | 9 | ||||
| -rw-r--r-- | lisp/net/eudc-vars.el | 3 |
2 files changed, 10 insertions, 2 deletions
diff --git a/lisp/net/eudc-export.el b/lisp/net/eudc-export.el index a65f555f89e..a9fac516745 100644 --- a/lisp/net/eudc-export.el +++ b/lisp/net/eudc-export.el | |||
| @@ -167,8 +167,13 @@ LOCATION is used as the address location for bbdb." | |||
| 167 | ;; External. | 167 | ;; External. |
| 168 | (declare-function bbdb-parse-phone-number "ext:bbdb-com" | 168 | (declare-function bbdb-parse-phone-number "ext:bbdb-com" |
| 169 | (string &optional number-type)) | 169 | (string &optional number-type)) |
| 170 | (declare-function bbdb-parse-phone "ext:bbdb-com" (string &optional style)) | ||
| 170 | (declare-function bbdb-string-trim "ext:bbdb" (string)) | 171 | (declare-function bbdb-string-trim "ext:bbdb" (string)) |
| 171 | 172 | ||
| 173 | (defun eudc-bbdbify-company (&rest organizations) | ||
| 174 | "Return ORGANIZATIONS as a list compatible with BBDB." | ||
| 175 | organizations) | ||
| 176 | |||
| 172 | (defun eudc-bbdbify-phone (phone location) | 177 | (defun eudc-bbdbify-phone (phone location) |
| 173 | "Parse PHONE into a vector compatible with BBDB. | 178 | "Parse PHONE into a vector compatible with BBDB. |
| 174 | PHONE is either a string supposedly containing a phone number or | 179 | PHONE is either a string supposedly containing a phone number or |
| @@ -179,7 +184,9 @@ LOCATION is used as the phone location for BBDB." | |||
| 179 | ((stringp phone) | 184 | ((stringp phone) |
| 180 | (let (phone-list) | 185 | (let (phone-list) |
| 181 | (condition-case err | 186 | (condition-case err |
| 182 | (setq phone-list (bbdb-parse-phone-number phone)) | 187 | (setq phone-list (if (eudc--using-bbdb-3-or-newer-p) |
| 188 | (bbdb-parse-phone phone) | ||
| 189 | (bbdb-parse-phone-number phone))) | ||
| 183 | (error | 190 | (error |
| 184 | (if (string= "phone number unparsable." (cadr err)) | 191 | (if (string= "phone number unparsable." (cadr err)) |
| 185 | (if (not (y-or-n-p (format "BBDB claims %S to be unparsable--insert anyway? " phone))) | 192 | (if (not (y-or-n-p (format "BBDB claims %S to be unparsable--insert anyway? " phone))) |
diff --git a/lisp/net/eudc-vars.el b/lisp/net/eudc-vars.el index 8cffa8e466a..a08d175fd6e 100644 --- a/lisp/net/eudc-vars.el +++ b/lisp/net/eudc-vars.el | |||
| @@ -369,7 +369,8 @@ BBDB fields. SPECs are sexps which are evaluated: | |||
| 369 | '((name . cn) | 369 | '((name . cn) |
| 370 | (net . mail) | 370 | (net . mail) |
| 371 | (address . (eudc-bbdbify-address postaladdress "Address")) | 371 | (address . (eudc-bbdbify-address postaladdress "Address")) |
| 372 | (phone . ((eudc-bbdbify-phone telephonenumber "Phone")))) | 372 | (phone . (eudc-bbdbify-phone telephonenumber "Phone")) |
| 373 | (company . (eudc-bbdbify-company o))) | ||
| 373 | "A mapping from BBDB to LDAP attributes. | 374 | "A mapping from BBDB to LDAP attributes. |
| 374 | This is a list of cons cells (BBDB-FIELD . SPEC-OR-LIST) where | 375 | This is a list of cons cells (BBDB-FIELD . SPEC-OR-LIST) where |
| 375 | BBDB-FIELD is the name of a field that must be defined in your BBDB | 376 | BBDB-FIELD is the name of a field that must be defined in your BBDB |