changeset 101971:e91fed5616f7

Simplify previous change.
author Glenn Morris <rgm@gnu.org>
date Thu, 12 Feb 2009 07:52:02 +0000
parents 5edae205a1ff
children 9eff457d4b49
files lisp/mail/rmailkwd.el
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mail/rmailkwd.el	Thu Feb 12 06:55:43 2009 +0000
+++ b/lisp/mail/rmailkwd.el	Thu Feb 12 07:52:02 2009 +0000
@@ -107,7 +107,9 @@
 	  (rmail-set-attribute attr-index state msg)
 	;; Is this keyword already present in msg's keyword list?
 	(let* ((header (rmail-get-keywords msg))
-	       (present (not (null (member label (split-string header ", "))))))
+	       (regexp (concat ", " (regexp-quote label) ","))
+	       (present (not (null (string-match-p
+				    regexp (concat ", " header ","))))))
 	  ;; If current state is not correct,
 	  (unless (eq present state)
 	    ;; either add it or delete it.