Commit 6df13146 authored by Sergio Durigan Junior's avatar Sergio Durigan Junior Committed by Thomas Fitzsimmons
Browse files

EUDC: Support BBDB >= 3

Fixes: bug#19678
Co-authored-by: default avatarThomas Fitzsimmons <>
* net/eudcb-bbdb.el (eudc-bbdb-field): New function.
(eudc-bbdb-filter-non-matching-record): Call eudc-bbdb-field.
(eudc-bbdb-format-record-as-result): Likewise.
parent 6b134bcb
2015-03-06 Sergio Durigan Junior <>
Thomas Fitzsimmons <>
* net/eudcb-bbdb.el (eudc-bbdb-field): New function.
(eudc-bbdb-filter-non-matching-record): Call eudc-bbdb-field.
(eudc-bbdb-format-record-as-result): Likewise.
2015-03-08 Dmitry Gutov <>
* progmodes/ruby-mode.el (ruby-font-lock-keywords): Use
......@@ -42,6 +42,24 @@
(defvar eudc-bbdb-current-query nil)
(defvar eudc-bbdb-current-return-attributes nil)
(defvar bbdb-version)
(defun eudc-bbdb-field (field-symbol)
"Convert FIELD-SYMBOL so that it is recognized by the current BBDB version.
BBDB < 3 used `net'; BBDB >= 3 uses `mail'."
;; This just-in-time translation permits upgrading from BBDB 2 to
;; BBDB 3 without restarting Emacs.
(if (and (eq field-symbol 'net)
;; MELPA versions of BBDB may have a bad package version,
;; but they're all version 3 or later.
(equal bbdb-version "@PACKAGE_VERSION@")
;; Development versions of BBDB can have the format "X.YZ
;; devo". Split the string just in case.
(version<= "3" (car (split-string bbdb-version)))))
(defvar eudc-bbdb-attributes-translation-alist
'((name . lastname)
(email . net)
......@@ -85,7 +103,9 @@
(setq bbdb-val
(eval (list (intern (concat "bbdb-record-"
(symbol-name attr)))
(if (listp bbdb-val)
(if eudc-bbdb-enable-substring-matches
......@@ -168,7 +188,7 @@ The record is filtered according to `eudc-bbdb-current-return-attributes'"
(setq val (eval
(list (intern
(concat "bbdb-record-"
(symbol-name attr)))
(symbol-name (eudc-bbdb-field attr))))
(error "Unknown BBDB attribute")))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment