From 33426278a5e40721684447253879d2f8abdc5bec Mon Sep 17 00:00:00 2001 From: Katsumi Yamaoka Date: Mon, 12 Jul 2004 06:32:40 +0000 Subject: [PATCH] (nnmail-split-lowercase-expanded): New user option. (nnmail-expand-newtext): Lowercase expanded entries if nnmail-split-lowercase-expanded is non-nil. --- lisp/ChangeLog | 7 +++++++ lisp/nnmail.el | 12 +++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2de7d328b..825485d45 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2004-07-12 Katsumi Yamaoka + From David Hedbor . + + * 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 * rfc2047.el (rfc2047-encode-region): Treat backslash-quoted diff --git a/lisp/nnmail.el b/lisp/nnmail.el index af90047a3..d1fc35180 100644 --- a/lisp/nnmail.el +++ b/lisp/nnmail.el @@ -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 -- 2.34.1