-(if (not (featurep 'bbdb))
- (load-library "bbdb"))
-(if (not (featurep 'bbdb-com))
- (load-library "bbdb-com"))
+
+;; Make it loadable on systems without bbdb.
+(require 'bbdb nil t)
+(require 'bbdb-com nil t)
(defun eudc-bbdb-filter-non-matching-record (record)
"Return RECORD if it matches `eudc-bbdb-current-query', nil otherwise."
(defun eudc-bbdb-filter-non-matching-record (record)
"Return RECORD if it matches `eudc-bbdb-current-query', nil otherwise."
(defun eudc-bbdb-format-record-as-result (record)
"Format the BBDB RECORD as a EUDC query result record.
The record is filtered according to `eudc-bbdb-current-return-attributes'"
(defun eudc-bbdb-format-record-as-result (record)
"Format the BBDB RECORD as a EUDC query result record.
The record is filtered according to `eudc-bbdb-current-return-attributes'"
(let ((attrs (or eudc-bbdb-current-return-attributes
'(firstname lastname aka company phones addresses net notes)))
attr
(let ((attrs (or eudc-bbdb-current-return-attributes
'(firstname lastname aka company phones addresses net notes)))
attr
BBDB attribute names.
RETURN-ATTRS is a list of attributes to return, defaulting to
`eudc-default-return-attributes'."
BBDB attribute names.
RETURN-ATTRS is a list of attributes to return, defaulting to
`eudc-default-return-attributes'."
(let ((eudc-bbdb-current-query query)
(eudc-bbdb-current-return-attributes return-attrs)
(query-attrs (eudc-bbdb-format-query query))
(let ((eudc-bbdb-current-query query)
(eudc-bbdb-current-return-attributes return-attrs)
(query-attrs (eudc-bbdb-format-query query))