From dbbcaf0f2b2368daa4434984842ea3c5d46148d6 Mon Sep 17 00:00:00 2001 From: djcb Date: Sat, 16 Mar 2013 17:58:17 +0200 Subject: [PATCH] * mu4e: make the +/- in +tag, -tag only match at the beginning of words --- mu4e/mu4e-actions.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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)))))