[emacs/f17] Fix for Emacs bug #11580, 'Fix querying BBDB for entries without a last name'

Karel Klíč kklic at fedoraproject.org
Sun Nov 18 00:28:43 UTC 2012


commit ee7d0c43746a868c7b4932190f0517791291c400
Author: Karel Klic <kklic at redhat.com>
Date:   Fri Nov 16 17:14:08 2012 +0100

    Fix for Emacs bug #11580, 'Fix querying BBDB for entries without a last name'

 emacs-bz11580-eudc-bbdb.patch |   47 +++++++++++++++++++++++++++++++++++++++++
 emacs.spec                    |   10 +++++++-
 2 files changed, 56 insertions(+), 1 deletions(-)
---
diff --git a/emacs-bz11580-eudc-bbdb.patch b/emacs-bz11580-eudc-bbdb.patch
new file mode 100644
index 0000000..98cf4f5
--- /dev/null
+++ b/emacs-bz11580-eudc-bbdb.patch
@@ -0,0 +1,47 @@
+From: Sergio Durigan Junior <sergiodj at riseup.net>
+Date: Tue, 02 Oct 2012 05:10:16 +0000
+Subject: Bugfix for EUDCB-BBDB queries.
+
+* net/eudcb-bbdb.el (eudc-bbdb-format-record-as-result): Fix
+querying BBDB for entries without a last name.
+
+2012-10-02  Sergio Durigan Junior  <sergiodj at riseup.net>
+
+	* net/eudcb-bbdb.el (eudc-bbdb-format-record-as-result): Fix
+	querying BBDB for entries without a last name (Bug#11580).
+
+Index: emacs-23.3/lisp/net/eudcb-bbdb.el
+===================================================================
+--- emacs-23.3.orig/lisp/net/eudcb-bbdb.el
++++ emacs-23.3/lisp/net/eudcb-bbdb.el
+@@ -169,18 +169,18 @@ The record is filtered according to `eud
+ 				  (symbol-name attr)))
+ 			 'record))))
+        (t
+-	(setq val "Unknown BBDB attribute")))
+-      (if val
+-	(cond
+-	 ((memq attr '(phones addresses))
+-	  (setq eudc-rec (append val eudc-rec)))
+-	 ((and (listp val)
+-	  (= 1 (length val)))
+-	  (setq eudc-rec (cons (cons attr (car val)) eudc-rec)))
+-	 ((> (length val) 0)
+-	  (setq eudc-rec (cons (cons attr val) eudc-rec)))
+-	 (t
+-	  (error "Unexpected attribute value")))))
++	(error "Unknown BBDB attribute")))
++      (cond
++       ((or (not val) (equal val ""))) ; do nothing
++       ((memq attr '(phones addresses))
++	(setq eudc-rec (append val eudc-rec)))
++       ((and (listp val)
++	     (= 1 (length val)))
++	(setq eudc-rec (cons (cons attr (car val)) eudc-rec)))
++       ((> (length val) 0)
++	(setq eudc-rec (cons (cons attr val) eudc-rec)))
++       (t
++	(error "Unexpected attribute value"))))
+     (nreverse eudc-rec)))
+ 
+ 
diff --git a/emacs.spec b/emacs.spec
index 69efa59..1b07184 100644
--- a/emacs.spec
+++ b/emacs.spec
@@ -3,7 +3,7 @@ Summary: GNU Emacs text editor
 Name: emacs
 Epoch: 1
 Version: 24.1
-Release: 6%{?dist}
+Release: 7%{?dist}
 License: GPLv3+
 URL: http://www.gnu.org/software/emacs/
 Group: Applications/Editors
@@ -30,8 +30,11 @@ Patch3: rpm-spec-mode-changelog.patch
 Patch7: emacs-spellchecker.patch
 # rhbz#830162
 Patch8: emacs-locate-library.patch
+
 # rhbz#847702
 Patch9: emacs-cve-2012-3479.patch
+# Fix for Emacs bug #11580.
+Patch10: emacs-bz11580-eudc-bbdb.patch
 
 BuildRequires: atk-devel, cairo-devel, freetype-devel, fontconfig-devel, dbus-devel, giflib-devel, glibc-devel, gtk2-devel, libpng-devel
 BuildRequires: libjpeg-devel, libtiff-devel, libX11-devel, libXau-devel, libXdmcp-devel, libXrender-devel, libXt-devel
@@ -155,6 +158,7 @@ packages that add functionality to Emacs.
 %patch7 -p1 -b .spellchecker
 %patch8 -p1 -b .locate-library
 %patch9 -p1 -b .cve-2012-3479
+%patch10 -p1 -b .emacs-bz11580-eudc-bbdb
 
 # Install site-lisp files
 cp %SOURCE7 %SOURCE10 site-lisp
@@ -439,6 +443,10 @@ update-desktop-database &> /dev/null || :
 %dir %{_datadir}/emacs/site-lisp/site-start.d
 
 %changelog
+* Tue Nov 06 2012 Sergio Durigan Junior <sergiodj at riseup.net> - 1:23.3-11
+- Fix for Emacs bug #11580, 'Fix querying BBDB for entries without a last
+  name'.
+
 * Mon Oct 22 2012 Karel Klíč <kklic at redhat.com> - 1:24.1-6
 - Rebuild
 


More information about the scm-commits mailing list