diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | lisp/bbdb.el | 8 |
2 files changed, 9 insertions, 4 deletions
@@ -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 |