summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Steingold <sds@goems.com>2000-08-10 18:03:25 +0000
committerSam Steingold <sds@goems.com>2000-08-10 18:03:25 +0000
commitfd183a813b2c478cdd494bc55dea4bffd971b98f (patch)
tree2fc818212bb2b259585b41b43159e398c43c1f7c
parentaaf0b47c5ccba702ff6663f563257e451c186c31 (diff)
* lisp/bbdb.el (bbdb-annotate-notes): `regexp-quote' the
annotation before matching it on existing notes
-rw-r--r--ChangeLog5
-rw-r--r--lisp/bbdb.el8
2 files changed, 9 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index b5ea9b1..31d8152 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2000-08-10 Sam Steingold <sds@gnu.org>
+
+ * lisp/bbdb.el (bbdb-annotate-notes): `regexp-quote' the
+ annotation before matching it on existing notes
+
2000-08-03 Sam Steingold <sds@gnu.org>
* lisp/bbdb.el (bbdb-notes-default-separator): new user option
diff --git a/lisp/bbdb.el b/lisp/bbdb.el
index 5ecac5a..b9c3276 100644
--- a/lisp/bbdb.el
+++ b/lisp/bbdb.el
@@ -2250,10 +2250,10 @@ Called by `bbdb-auto-notes-hook'."
(assoc (symbol-name fieldname) (bbdb-propnames))
(bbdb-set-propnames (append (bbdb-propnames)
(list (list (symbol-name fieldname))))))
- (let ((notes (bbdb-string-trim
- (or (bbdb-record-getprop bbdb-record fieldname) ""))))
- (if (or (string= "" annotation) (string-match annotation notes))
- nil
+ (let ((notes (bbdb-string-trim
+ (or (bbdb-record-getprop bbdb-record fieldname) ""))))
+ (unless (or (string= "" annotation)
+ (string-match (regexp-quote annotation) notes))
(bbdb-record-putprop bbdb-record fieldname
(if (or replace (string= notes ""))
annotation