diff --git a/mu4e/mu4e-actions.el b/mu4e/mu4e-actions.el index 415765a3..eab28f58 100644 --- a/mu4e/mu4e-actions.el +++ b/mu4e/mu4e-actions.el @@ -205,9 +205,10 @@ store your org-contacts." tagstr) (dolist (tag (split-string-and-unquote retag) taglist) - (cond ((string-match "\\+\\(.+\\)" tag) - (setq taglist (push (match-string 1 tag) taglist))) - ((string-match "\\-\\(.+\\)" tag) + (cond + ((string-match "\\<\\+\\(.+\\)" tag) + (setq taglist (push (match-string 1 tag) taglist))) + ((string-match "\\<\\-\\(.+\\)" tag) (setq taglist (delete (match-string 1 tag) taglist))) (t (setq taglist (push tag taglist)))))