]> git.eshelyaron.com Git - emacs.git/commitdiff
(rmail-dont-reply-to): Anchor user login
authorEli Zaretskii <eliz@is.elta.co.il>
Mon, 16 Feb 2004 11:43:57 +0000 (11:43 +0000)
committerEli Zaretskii <eliz@is.elta.co.il>
Mon, 16 Feb 2004 11:43:57 +0000 (11:43 +0000)
name and email address at the beginning and end of the address.

lisp/ChangeLog
lisp/mail/mail-utils.el

index 6b2371196dfb161d575c46aef30bfe01551426cb..6c8a7f67ba0ab46d6d18ce489af2d7d5a890c91c 100644 (file)
@@ -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
index e60e8358de94036686861df60ed3d3e98a429734..96a57b38f078d53141374fa5978f5ce18dec5d34 100644 (file)
@@ -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))