[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/gnorb d754d2f 336/449: Fixing `gnorb-bbdb-postings-styl

From: Stefan Monnier
Subject: [elpa] externals/gnorb d754d2f 336/449: Fixing `gnorb-bbdb-postings-styles'
Date: Fri, 27 Nov 2020 23:16:06 -0500 (EST)

branch: externals/gnorb
commit d754d2f220815a804aabe4707835a7bdbef14e77
Author: Eric Abrahamsen <eric@ericabrahamsen.net>
Commit: Eric Abrahamsen <eric@ericabrahamsen.net>

    Fixing `gnorb-bbdb-postings-styles'
    * gnorb-bbdb.el (gnorb-bbdb-configure-posting-styles): Hard to know what
      I was thinking when I wrote this, that's not how you use throw/catch
      at all. Luckily no one seems to be using this part of the code. And
      why would they? It doesn't make a whole lot of sense.
 gnorb-bbdb.el | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/gnorb-bbdb.el b/gnorb-bbdb.el
index cb19aee..306ea01 100644
--- a/gnorb-bbdb.el
+++ b/gnorb-bbdb.el
@@ -258,31 +258,31 @@ is non-nil (as in interactive calls) be verbose."
        (when (catch 'match
                 ((eq field 'address)
-                 (dolist (a rec-val matchp)
+                 (dolist (a rec-val)
                    (unless (and label
                                 (not (string-match label (car a))))
                           (bbdb-format-address-default a))
-                       (throw 'match)))))
+                       (throw 'match t)))))
                 ((eq field 'phone)
-                 (dolist (p rec-val matchp)
+                 (dolist (p rec-val)
                    (unless (and label
                                 (not (string-match label (car p))))
                          (string-match-p val (bbdb-phone-string p))
-                       (throw 'match)))))
+                       (throw 'match t)))))
                 ((consp rec-val)
-                 (dolist (f rec-val matchp)
+                 (dolist (f rec-val)
                    (when (string-match-p val f)
-                     (throw 'match))))
+                     (throw 'match t))))
                 ((fboundp field)
-                 (when (matchp (funcall field r))
-                   (throw 'match)))
+                 (when (string-match-p (funcall field r))
+                   (throw 'match t)))
                 ((stringp rec-val)
                  (when (string-match-p val rec-val)
-                   (throw 'match)))))
+                   (throw 'match t)))))
          ;; there are matches, run through the field setters in last
          ;; element of the sexp
          (dolist (attribute style)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]