(nnmail-split-lowercase-expanded): New user option.
authorKatsumi Yamaoka <yamaoka@jpl.org>
Mon, 12 Jul 2004 06:32:40 +0000 (06:32 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Mon, 12 Jul 2004 06:32:40 +0000 (06:32 +0000)
(nnmail-expand-newtext): Lowercase expanded entries if
 nnmail-split-lowercase-expanded is non-nil.

lisp/ChangeLog
lisp/nnmail.el

index 2de7d32..825485d 100644 (file)
@@ -1,3 +1,10 @@
+2004-07-12  Katsumi Yamaoka  <yamaoka@jpl.org>
+       From David Hedbor <dhedbor@real.com>.
+
+       * nnmail.el (nnmail-split-lowercase-expanded): New user option.
+       (nnmail-expand-newtext): Lowercase expanded entries if
+       nnmail-split-lowercase-expanded is non-nil.
+
 2004-07-12  Katsumi Yamaoka  <yamaoka@jpl.org>
 
        * rfc2047.el (rfc2047-encode-region): Treat backslash-quoted
index af90047..d1fc351 100644 (file)
@@ -574,6 +574,13 @@ by anything."
   :group 'nnmail
   :type 'boolean)
 
+(defcustom nnmail-split-lowercase-expanded t
+  "Whether to lowercase expanded entries (i.e. \\N) when splitting mails.
+This avoids the creation of multiple groups when users send to an address
+using different case (i.e. mailing-list@domain vs Mailing-List@Domain)."
+  :group 'nnmail
+  :type 'boolean)
+
 ;;; Internal variables.
 
 (defvar nnmail-article-buffer " *nnmail incoming*"
@@ -1464,7 +1471,10 @@ See the documentation for the variable `nnmail-split-fancy' for details."
              (setq N 0)
            (setq N (- c ?0)))
          (when (match-beginning N)
-           (push (buffer-substring (match-beginning N) (match-end N))
+           (push (if nnmail-split-lowercase-expanded
+                     (downcase (buffer-substring (match-beginning N)
+                                                 (match-end N)))
+                   (buffer-substring (match-beginning N) (match-end N)))
                  expanded))))
       (setq pos (1+ pos)))
     (if did-expand