From ec3c8de4795c0a8832bc27243524b3e01b344676 Mon Sep 17 00:00:00 2001 From: Petr Hracek Date: Fri, 11 Sep 2015 17:35:44 +0200 Subject: [PATCH] Support BBDB >= 3 (EUDC) (#1261668) Signed-off-by: Petr Hracek --- emacs-bbdb.patch | 49 ++++++++++++++++++++++++++++++++++++++++++++++++ emacs.spec | 7 ++++++- 2 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 emacs-bbdb.patch diff --git a/emacs-bbdb.patch b/emacs-bbdb.patch new file mode 100644 index 0000000..af4b2fe --- /dev/null +++ b/emacs-bbdb.patch @@ -0,0 +1,49 @@ +diff --git a/lisp/net/eudcb-bbdb.el b/lisp/net/eudcb-bbdb.el +index 0400e5b..582ecb5 100644 +--- a/lisp/net/eudcb-bbdb.el ++++ b/lisp/net/eudcb-bbdb.el +@@ -41,6 +41,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) ++ (or ++ ;; 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))))) ++ 'mail ++ field-symbol)) ++ + (defvar eudc-bbdb-attributes-translation-alist + '((name . lastname) + (email . net) +@@ -84,7 +102,9 @@ + (progn + (setq bbdb-val + (eval (list (intern (concat "bbdb-record-" +- (symbol-name attr))) ++ (symbol-name ++ (eudc-bbdb-field ++ attr)))) + 'record))) + (if (listp bbdb-val) + (if eudc-bbdb-enable-substring-matches +@@ -167,7 +187,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)))) + 'record)))) + (t + (error "Unknown BBDB attribute"))) diff --git a/emacs.spec b/emacs.spec index 93fa931..44242fc 100644 --- a/emacs.spec +++ b/emacs.spec @@ -5,7 +5,7 @@ Summary: GNU Emacs text editor Name: emacs Epoch: 1 Version: 24.5 -Release: 5%{?dist} +Release: 6%{?dist} License: GPLv3+ and CC0-1.0 URL: http://www.gnu.org/software/emacs/ Group: Applications/Editors @@ -28,6 +28,7 @@ Patch1: emacs-spellchecker.patch Patch2: emacs-pdf-default.patch Patch3: emacs-grep-deprecated.patch Patch4: emacs-system-crypto-policies.patch +Patch5: emacs-bbdb.patch BuildRequires: atk-devel BuildRequires: cairo-devel @@ -190,6 +191,7 @@ packages that add functionality to Emacs. %patch2 -p1 -b .pdf-default.patch %patch3 -p1 -b .grep-deprecated %patch4 -p1 -b .system-crypto-policies +%patch5 -p1 -b .bbdb autoconf # We prefer our emacs.desktop file @@ -484,6 +486,9 @@ update-desktop-database &> /dev/null || : %dir %{_datadir}/emacs/site-lisp/site-start.d %changelog +* Fri Sep 11 2015 Petr Hracek - 1:24.5-6 +- Support BBDB >= 3 (EUDC) (#1261668) + * Wed Jun 17 2015 Petr Hracek - 1:24.5-5 - game and Trademark problem (#1231676)