]> git.eshelyaron.com Git - emacs.git/commitdiff
Simplify previous change.
authorGlenn Morris <rgm@gnu.org>
Thu, 12 Feb 2009 07:52:02 +0000 (07:52 +0000)
committerGlenn Morris <rgm@gnu.org>
Thu, 12 Feb 2009 07:52:02 +0000 (07:52 +0000)
lisp/mail/rmailkwd.el

index 03f48ad91a773ffbbc5e757bbd9d98ac7b7e64a9..a5dd81dda8cc7b114c62ef49f239e2160839d5af 100644 (file)
@@ -107,7 +107,9 @@ LABEL may be a symbol or string."
          (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.