[emacs] Fix for Emacs bug #11580

Karel Klíč kklic at fedoraproject.org
Fri Nov 16 16:11:52 UTC 2012


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

    Fix for Emacs bug #11580

 emacs-bz11580-eudc-bbdb.patch |   47 +++++++++++++++++++++++++++++++++++++++++
 emacs.spec                    |    9 +++++++-
 2 files changed, 55 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 8d4d82b..6e8a3c7 100644
--- a/emacs.spec
+++ b/emacs.spec
@@ -3,7 +3,7 @@ Summary: GNU Emacs text editor
 Name: emacs
 Epoch: 1
 Version: 24.2
-Release: 6%{?dist}
+Release: 7%{?dist}
 License: GPLv3+
 URL: http://www.gnu.org/software/emacs/
 Group: Applications/Editors
@@ -20,6 +20,8 @@ Source7: emacs-terminal.sh
 Patch7: emacs-spellchecker.patch
 # rhbz#830162, fixed in org-mode upstream
 Patch8: emacs-locate-library.patch
+# Fix for Emacs bug #11580.
+Patch9: emacs-bz11580-eudc-bbdb.patch
 
 BuildRequires: atk-devel cairo-devel freetype-devel fontconfig-devel dbus-devel giflib-devel glibc-devel libpng-devel
 BuildRequires: libjpeg-devel libtiff-devel libX11-devel libXau-devel libXdmcp-devel libXrender-devel libXt-devel
@@ -150,6 +152,7 @@ packages that add functionality to Emacs.
 
 %patch7 -p1 -b .spellchecker
 %patch8 -p1 -b .locate-library
+%patch9 -p1 -b .emacs-bz11580-eudc-bbdb
 
 # We prefer our emacs.desktop file
 cp %SOURCE1 etc/emacs.desktop
@@ -424,6 +427,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.2-6
 - Change xorg-x11-fonts-misc dependency to dejavu-sans-mono-fonts, rhbz#732422
 


More information about the scm-commits mailing list