summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@is.elta.co.il>2004-02-16 11:42:10 +0000
committerEli Zaretskii <eliz@is.elta.co.il>2004-02-16 11:42:10 +0000
commit3d96077b2f41475d7311f89a2908fac31aadb21a (patch)
treeee5ca10674da05e2dd31eb1b663a0506892ed40c
parent7d559ec88790b9e683128137096afee645ca06a6 (diff)
downloademacs-3d96077b2f41475d7311f89a2908fac31aadb21a.tar.gz
(rmail-dont-reply-to): Anchor user login
name and email address at the beginning and end of the address.
-rw-r--r--lisp/mail/mail-utils.el10
1 files changed, 8 insertions, 2 deletions
diff --git a/lisp/mail/mail-utils.el b/lisp/mail/mail-utils.el
index e60e8358de9..96a57b38f07 100644
--- a/lisp/mail/mail-utils.el
+++ b/lisp/mail/mail-utils.el
@@ -227,9 +227,15 @@ the comma-separated list. The pruned list is returned."
"")
(if (and user-mail-address
(not (equal user-mail-address user-login-name)))
- (concat (regexp-quote user-mail-address) "\\|")
+ ;; Anchor the login name and email address so
+ ;; that we don't match substrings: if the
+ ;; login name is "foo", we shouldn't match
+ ;; "barfoo@baz.com".
+ (concat "\\`"
+ (regexp-quote user-mail-address)
+ "\\'\\|")
"")
- (concat (regexp-quote user-login-name) "\\>"))))
+ (concat "\\`" (regexp-quote user-login-name) "@"))))
;; Split up DESTINATIONS and match each element separately.
(let ((start-pos 0) (cur-pos 0)
(case-fold-search t))