"Roland Winkler" <wink...@gnu.org> writes:

> On Wed Mar 11 2015 Eric Abrahamsen wrote:
>> For this issue, this patch ought to do it.
>
> The optional arg COMPARE-FN of add-to-list defaults to equal.

So it does! Here's another.

>From 49be4b2f1e22075eb41c29a6e9e3e37fe23dc255 Mon Sep 17 00:00:00 2001
From: Eric Abrahamsen <e...@ericabrahamsen.net>
Date: Wed, 11 Mar 2015 18:03:29 +0800
Subject: [PATCH] Compare phone/address labels as strings

* lisp/bbdb.el (bbdb-record-set-field, bbdb-parse-records): When
  collecting labels for phone and address fields, add-to-list should
  use the default equal test for comparison.
---
 lisp/bbdb.el | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lisp/bbdb.el b/lisp/bbdb.el
index f32a74b..62dfc92 100644
--- a/lisp/bbdb.el
+++ b/lisp/bbdb.el
@@ -2831,7 +2831,7 @@ See also `bbdb-record-field'."
                                                    value 'equal)))
            (if check (bbdb-check-type value (bbdb-record-phone record-type) t))
            (dolist (phone value)
-             (add-to-list 'bbdb-phone-label-list (bbdb-phone-label phone) nil 'eq))
+             (add-to-list 'bbdb-phone-label-list (bbdb-phone-label phone) nil))
            (bbdb-record-set-phone record value))
 
           ;; Address
@@ -2840,7 +2840,7 @@ See also `bbdb-record-field'."
                                                    value 'equal)))
            (if check (bbdb-check-type value (bbdb-record-address record-type) t))
            (dolist (address value)
-             (add-to-list 'bbdb-address-label-list (bbdb-address-label address) nil 'eq)
+             (add-to-list 'bbdb-address-label-list (bbdb-address-label address) nil)
              (mapc (lambda (street) (bbdb-add-to-list 'bbdb-street-list street))
                    (bbdb-address-streets address))
              (bbdb-add-to-list 'bbdb-city-list (bbdb-address-city address))
@@ -3263,9 +3263,9 @@ If `bbdb-file' uses an outdated format, it is migrated to `bbdb-file-format'."
 
           ;; Set the completion lists
           (dolist (phone (bbdb-record-phone record))
-            (add-to-list 'bbdb-phone-label-list (bbdb-phone-label phone) nil 'eq))
+            (add-to-list 'bbdb-phone-label-list (bbdb-phone-label phone) nil))
           (dolist (address (bbdb-record-address record))
-            (add-to-list 'bbdb-address-label-list (bbdb-address-label address) nil 'eq)
+            (add-to-list 'bbdb-address-label-list (bbdb-address-label address) nil)
             (mapc (lambda (street) (bbdb-add-to-list 'bbdb-street-list street))
                   (bbdb-address-streets address))
             (bbdb-add-to-list 'bbdb-city-list (bbdb-address-city address))
-- 
2.3.2

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/

Reply via email to