Mercurial > emacs
changeset 101970:5edae205a1ff
(rmail-set-label): Fix the test for a label being already present. (Bug#2210)
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Thu, 12 Feb 2009 06:55:43 +0000 |
parents | 214450de83bc |
children | e91fed5616f7 |
files | lisp/ChangeLog lisp/mail/rmailkwd.el |
diffstat | 2 files changed, 7 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Thu Feb 12 06:28:59 2009 +0000 +++ b/lisp/ChangeLog Thu Feb 12 06:55:43 2009 +0000 @@ -1,3 +1,8 @@ +2009-02-12 Glenn Morris <rgm@gnu.org> + + * mail/rmailkwd.el (rmail-set-label): Fix the test for a label being + already present. (Bug#2210) + 2009-02-12 Kenichi Handa <handa@m17n.org> * international/characters.el (?.): New character category for
--- a/lisp/mail/rmailkwd.el Thu Feb 12 06:28:59 2009 +0000 +++ b/lisp/mail/rmailkwd.el Thu Feb 12 06:55:43 2009 +0000 @@ -106,9 +106,8 @@ ;; If so, set it as an attribute. (rmail-set-attribute attr-index state msg) ;; Is this keyword already present in msg's keyword list? - (let* ((header (rmail-get-header rmail-keyword-header msg)) - (regexp (concat ", " (regexp-quote label) ",")) - (present (string-match regexp (concat ", " header ",")))) + (let* ((header (rmail-get-keywords msg)) + (present (not (null (member label (split-string header ", ")))))) ;; If current state is not correct, (unless (eq present state) ;; either add it or delete it.