From 655a218acee346dfa403d755f8c9518f0b7957db Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Thu, 12 Feb 2009 07:52:02 +0000 Subject: [PATCH] Simplify previous change. --- lisp/mail/rmailkwd.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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." (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. -- 2.39.5