aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/mail/rmailkwd.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/mail/rmailkwd.el b/lisp/mail/rmailkwd.el
index 03f48ad91a7..a5dd81dda8c 100644
--- a/lisp/mail/rmailkwd.el
+++ b/lisp/mail/rmailkwd.el
@@ -107,7 +107,9 @@ LABEL may be a symbol or string."
107 (rmail-set-attribute attr-index state msg) 107 (rmail-set-attribute attr-index state msg)
108 ;; Is this keyword already present in msg's keyword list? 108 ;; Is this keyword already present in msg's keyword list?
109 (let* ((header (rmail-get-keywords msg)) 109 (let* ((header (rmail-get-keywords msg))
110 (present (not (null (member label (split-string header ", ")))))) 110 (regexp (concat ", " (regexp-quote label) ","))
111 (present (not (null (string-match-p
112 regexp (concat ", " header ","))))))
111 ;; If current state is not correct, 113 ;; If current state is not correct,
112 (unless (eq present state) 114 (unless (eq present state)
113 ;; either add it or delete it. 115 ;; either add it or delete it.