From: yamaoka Date: Mon, 12 Jul 2004 06:33:57 +0000 (+0000) Subject: Synch to No Gnus 200407120632. X-Git-Tag: t-gnus-6_17_4-quimby-~824 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=1f8725a7a4456228bb8e62293b179b4bdea70917;p=elisp%2Fgnus.git- Synch to No Gnus 200407120632. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index bc527ad..1cfbc35 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,4 +1,11 @@ 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 characters as non-special. diff --git a/lisp/nnmail.el b/lisp/nnmail.el index 1949e6e..58cbc4e 100644 --- a/lisp/nnmail.el +++ b/lisp/nnmail.el @@ -573,6 +573,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*" @@ -1463,7 +1470,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 diff --git a/texi/ChangeLog b/texi/ChangeLog index 2c3fa0d..20c97c8 100644 --- a/texi/ChangeLog +++ b/texi/ChangeLog @@ -1,3 +1,8 @@ +2004-07-12 Katsumi Yamaoka + + * gnus.texi (Splitting Mail): Add nnmail-split-lowercase-expanded. + (Fancy Mail Splitting): Ditto. + 2004-07-02 Katsumi Yamaoka * emacs-mime.texi (Encoding Customization): Addition. diff --git a/texi/gnus-ja.texi b/texi/gnus-ja.texi index 03ed427..31e0550 100644 --- a/texi/gnus-ja.texi +++ b/texi/gnus-ja.texi @@ -12554,6 +12554,11 @@ Gnus を使って新しいメールを読む事は非常に簡単です。あなたのメールバック ("list.\\1" "From:.* \\(.*\\)-list@@majordomo.com") @end lisp +@noindent +この場合、挿入されるテキストを小文字にすべきかどうか +を @code{nnmail-split-lowercase-expanded} が制御します。@xref{Fancy Mail +Splitting}. + 二番目の要素は関数である事もできます。その場合は、それは法則の最初の要素 を引数として、ヘッダーに範囲を狭めて (narrowed to headers) 呼ばれます。 それは、メールがそのグループに属すると考えるのであれば、@code{nil} でな @@ -13423,6 +13428,14 @@ table) に従って完全に合致しなければなりません。正規表現でフィールド名か 使われます。同様に、要素 @samp{\\1} から @samp{\\9} まではグループ付 け 1 から 9 までで合致した文字列で代替されます。 +@vindex nnmail-split-lowercase-expanded +ここで、合致した文字列を小文字にしたもので代替するべきかどうか +を @code{nnmail-split-lowercase-expanded} が制御します。これを +非-@code{nil} にすることによって、アドレスに大文字と小文字が区別せずに使 +われている (例えば mailing-list@@domain と Mailing-List@@Domain) 場合で +も、複数のグループが生成されてしまうことを避けることができます。ディフォ +ルトは @code{t} です。 + @vindex nnmail-split-fancy-match-partial-words @code{nnmail-split-fancy-match-partial-words} は、特級分割で部分的な語が 合致するかどうかを制御します。 diff --git a/texi/gnus.texi b/texi/gnus.texi index fa39cfe..f6eae05 100644 --- a/texi/gnus.texi +++ b/texi/gnus.texi @@ -13307,6 +13307,10 @@ insert sub-expressions from the matched text. For instance: ("list.\\1" "From:.* \\(.*\\)-list@@majordomo.com") @end lisp +@noindent +In that case, @code{nnmail-split-lowercase-expanded} controls whether +the inserted text should be made lowercase. @xref{Fancy Mail Splitting}. + The second element can also be a function. In that case, it will be called narrowed to the headers with the first element of the rule as the argument. It should return a non-@code{nil} value if it thinks that the @@ -14204,6 +14208,14 @@ matched string will be substituted. Similarly, the elements @samp{\\1} up to @samp{\\9} will be substituted with the text matched by the groupings 1 through 9. +@vindex nnmail-split-lowercase-expanded +Where @code{nnmail-split-lowercase-expanded} controls whether the +lowercase of the matched string should be used for the substitution. +Setting it as non-@code{nil} is useful to avoid the creation of multiple +groups when users send to an address using different case +(i.e. mailing-list@@domain vs Mailing-List@@Domain). The default value +is @code{t}. + @vindex nnmail-split-fancy-match-partial-words @code{nnmail-split-fancy-match-partial-words} controls whether partial words are matched during fancy splitting.