diff options
| author | Eli Zaretskii <eliz@is.elta.co.il> | 2004-02-16 11:43:57 +0000 |
|---|---|---|
| committer | Eli Zaretskii <eliz@is.elta.co.il> | 2004-02-16 11:43:57 +0000 |
| commit | ca06718d25aa3202033b02b37e36b9734fa0b827 (patch) | |
| tree | 7dd1a31d95a939e95a2a5933941ac44b77781bbd /lisp | |
| parent | 15e04960f8d0cdcb9a1ef2e8d2360c7851de8fb6 (diff) | |
| download | emacs-ca06718d25aa3202033b02b37e36b9734fa0b827.tar.gz | |
(rmail-dont-reply-to): Anchor user login
name and email address at the beginning and end of the address.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 8 | ||||
| -rw-r--r-- | lisp/mail/mail-utils.el | 10 |
2 files changed, 16 insertions, 2 deletions
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 <eliz@elta.co.il> + + * 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 <tak@kmc.gr.jp> (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)) |
