From: Eli Zaretskii Date: Mon, 16 Feb 2004 11:43:57 +0000 (+0000) Subject: (rmail-dont-reply-to): Anchor user login X-Git-Tag: ttn-vms-21-2-B4~7610 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ca06718d25aa3202033b02b37e36b9734fa0b827;p=emacs.git (rmail-dont-reply-to): Anchor user login name and email address at the beginning and end of the address. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6b2371196df..6c8a7f67ba0 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2004-02-16 Eli Zaretskii + + * mail/mail-utils.el (rmail-dont-reply-to): Anchor user login name + and email address at the beginning and end of the address. + + * mail/rmail.el (rmail-default-dont-reply-to-names): Make "info-" + anchored at the beginning of the email address. + 2004-02-16 TAKAI Kousuke (tiny change) * international/ccl.el (ccl-compile-write): Pass `left' to 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))