From: Glenn Morris Date: Thu, 12 Feb 2009 07:52:02 +0000 (+0000) Subject: Simplify previous change. X-Git-Tag: emacs-pretest-23.0.91~267 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=655a218acee346dfa403d755f8c9518f0b7957db;p=emacs.git Simplify previous change. --- 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.