Patches between 0.4 and 0.5

Lars Magne Ingebrigtsen <[email protected]> Mon, 01 May 2006 17:20:16 +0200
Newsgroups gmane.emacs.gnus.patches
Message-ID <[email protected]>
Index: gnus/ChangeLog
diff -u gnus/ChangeLog:7.88 gnus/ChangeLog:7.91
--- gnus/ChangeLog:7.88	Tue Apr 11 16:17:52 2006
+++ gnus/ChangeLog	Wed Apr 19 00:21:56 2006
@@ -1,3 +1,20 @@
+2006-04-19  Reiner Steib  <[email protected]>
+
+	* make.bat: Use "echo *" to clarify the output.
+	(:lisp, :infotest): Avoid "not found" errors
+	(:etc): Remove etc\gnus.  Be more verbose.  Add new smilies.
+	Simplify.
+
+2006-04-11  Reiner Steib  <[email protected]>
+
+	* etc/Makefile.in (install): Install new smileys.
+
+2006-04-11  Adam Sj,Ax(Bgren  <[email protected]>
+
+	* etc/images/smilies/grayscale/*.xpm: New larger grayscale smileys.
+
+	* etc/images/smilies/medium/*.xpm: New colorful smileys.
+
 2006-04-11  Reiner Steib  <[email protected]>
 
 	* README: No Gnus v0.4 is released.
Index: gnus/make.bat
diff -u gnus/make.bat:7.11 gnus/make.bat:7.12
--- gnus/make.bat:7.11	Fri Mar  3 08:46:30 2006
+++ gnus/make.bat	Wed Apr 19 00:21:56 2006
@@ -1,4 +1,5 @@
-@echo off
+@echo OFF
+REM Change this to ON when debugging this batch file.
 
 rem Written by Frank Schmitt ([email protected])
 rem based on the work by David Charlap ([email protected])
@@ -17,9 +18,12 @@
 set GNUS_PWD_SAVE=%PWD%
 set PWD=
 set ERROR=:
+REM set pause=
 
 if "%1" == "" goto usage
 
+echo * Installing Gnus on your system.  Operating system:
+ver
 rem Emacs 20.7 no longer includes emacs.bat. Use emacs.exe if the batch file is
 rem not present -- this also fixes the problem about too many parameters on Win9x.
 if exist %1\emacs.bat goto ebat
@@ -78,12 +82,13 @@
 goto lisp
 
 :lisp
+if "%pause%" == "pause" pause
 set EMACSBATCH=call %1\%EMACS% %EMACS_ARGS%
 cd lisp
-attrib -r gnus-load.el
+if exist gnus-load.el attrib -r gnus-load.el
 if exist gnus-load.el del gnus-load.el
 echo.
-echo Stand by while generating autoloads.
+echo * Stand by while generating autoloads.
 echo.
 %EMACSBATCH% -l ./dgnushack.el -f dgnushack-make-cus-load .
 if ErrorLevel 1 set ERROR=make-cus-load
@@ -92,14 +97,14 @@
 %EMACSBATCH% -l ./dgnushack.el -f dgnushack-make-load
 if ErrorLevel 1 set ERROR=%ERROR%,make-load
 echo.
-echo Stand by while compiling lisp files.
+echo * Stand by while compiling lisp files.
 echo.
 %EMACSBATCH% -l ./dgnushack.el -f dgnushack-compile
 if ErrorLevel 1 set ERROR=%ERROR%,compile
 
 if not "%2" == "/copy" goto infotest
 echo.
-echo Stand by while copying lisp files.
+echo * Stand by while copying lisp files.
 echo.
 if not exist %GNUS_LISP_DIR%\nul mkdir %GNUS_LISP_DIR%
 xcopy /R /Q /Y *.el* %GNUS_LISP_DIR%
@@ -108,12 +113,13 @@
 
 :infotest
 cd ..\texi
-attrib -r sieve
+if exist sieve attrib -r sieve
 if exist sieve del sieve
 
+echo * Checking if makeinfo is available...
 makeinfo sieve.texi
 if exist sieve goto minfo
-REM It seems that makeinfo isn't available
+echo * No makeinfo found, using infohack.el.
 set EMACSINFO=%EMACSBATCH% -l infohack.el -f batch-makeinfo
 echo.
 echo ***************************************************************************
@@ -132,8 +138,9 @@
 goto info
 
 :info
+if "%pause%" == "pause" pause
 echo.
-echo Stand by while generating info files.
+echo * Stand by while generating info files.
 echo.
 %EMACSINFO% emacs-mime.texi
 if ErrorLevel 1 set ERROR=%ERROR%,emacs-mime.texi
@@ -152,7 +159,7 @@
 if not exist %GNUS_INFO_DIR%\nul mkdir %GNUS_INFO_DIR%
 
 echo.
-echo Stand by while copying info files.
+echo * Stand by while copying info files.
 echo.
 xcopy /R /Q /Y gnus       %GNUS_INFO_DIR%
 if ErrorLevel 1 set ERROR=%ERROR%,copy-gnus-info
@@ -186,28 +193,56 @@
 echo.
 
 :etc
+if "%pause%" == "pause" pause
 cd ..\etc
 echo.
-echo Stand by while copying etc files.
+echo * Stand by while copying etc files.
 echo.
-if not exist %GNUS_ETC_DIR%\nul mkdir %GNUS_ETC_DIR%
+REM
+if not exist %GNUS_ETC_DIR% mkdir %GNUS_ETC_DIR%
+echo ** gnus-tut.txt ...
 xcopy /R /Q /Y gnus-tut.txt %GNUS_ETC_DIR%
 if ErrorLevel 1 set ERROR=%ERROR%,copy-etc-gnus-tut-txt
-if not exist %GNUS_ETC_DIR%\gnus\nul mkdir %GNUS_ETC_DIR%\gnus
-xcopy /R /Q /Y .\gnus\* %GNUS_ETC_DIR%\gnus\
-if ErrorLevel 1 set ERROR=%ERROR%,copy-etc-gnus-*
-if not exist %GNUS_ETC_DIR%\images\nul mkdir %GNUS_ETC_DIR%\images
-xcopy /R /Q /Y .\images\*.??? %GNUS_ETC_DIR%\images
-if ErrorLevel 1 set ERROR=%ERROR%,copy-etc-images-*
-if not exist %GNUS_ETC_DIR%\images\gnus\nul mkdir %GNUS_ETC_DIR%\images\gnus
-xcopy /R /Q /Y .\images\gnus\* %GNUS_ETC_DIR%\images\gnus\
-if ErrorLevel 1 set ERROR=%ERROR%,copy-etc-images-gnus-*
-if not exist %GNUS_ETC_DIR%\images\mail\nul mkdir %GNUS_ETC_DIR%\images\mail
-xcopy /R /Q /Y .\images\mail\* %GNUS_ETC_DIR%\images\mail\
-if ErrorLevel 1 set ERROR=%ERROR%,copy-etc-images-mail-*
-if not exist %GNUS_ETC_DIR%\images\smilies\nul mkdir %GNUS_ETC_DIR%\images\smilies
-xcopy /R /Q /Y .\images\smilies\* %GNUS_ETC_DIR%\images\smilies\
-if ErrorLevel 1 set ERROR=%ERROR%,copy-etc-images-smilies-*
+REM
+REM FIXME: Instead of C&P, we should use a FOR loop.
+REM
+set i=images
+if not exist %GNUS_ETC_DIR%\%i%\nul mkdir %GNUS_ETC_DIR%\%i%
+echo ** .\%i%\ ...
+xcopy /R /Q /Y .\%i%\*.* %GNUS_ETC_DIR%\%i%\
+if ErrorLevel 1 set ERROR=%ERROR%,copy-etc-%i%
+REM
+set i=images\mail
+if not exist %GNUS_ETC_DIR%\%i%\nul mkdir %GNUS_ETC_DIR%\%i%
+echo ** .\%i%\ ...
+xcopy /R /Q /Y .\%i%\*.* %GNUS_ETC_DIR%\%i%\
+if ErrorLevel 1 set ERROR=%ERROR%,copy-etc-%i%
+REM
+set i=images\gnus
+if not exist %GNUS_ETC_DIR%\%i%\nul mkdir %GNUS_ETC_DIR%\%i%
+echo ** .\%i%\ ...
+xcopy /R /Q /Y .\%i%\*.* %GNUS_ETC_DIR%\%i%\
+if ErrorLevel 1 set ERROR=%ERROR%,copy-etc-%i%
+REM
+set i=images\smilies
+if not exist %GNUS_ETC_DIR%\%i%\nul mkdir %GNUS_ETC_DIR%\%i%
+echo ** .\%i%\ ...
+xcopy /R /Q /Y .\%i%\*.* %GNUS_ETC_DIR%\%i%\
+if ErrorLevel 1 set ERROR=%ERROR%,copy-etc-%i%
+REM
+set i=images\smilies\grayscale
+if not exist %GNUS_ETC_DIR%\%i%\nul mkdir %GNUS_ETC_DIR%\%i%
+echo ** .\%i%\ ...
+xcopy /R /Q /Y .\%i%\*.* %GNUS_ETC_DIR%\%i%\
+if ErrorLevel 1 set ERROR=%ERROR%,copy-etc-%i%
+REM
+set i=images\smilies\medium
+if not exist %GNUS_ETC_DIR%\%i%\nul mkdir %GNUS_ETC_DIR%\%i%
+echo ** .\%i%\ ...
+xcopy /R /Q /Y .\%i%\*.* %GNUS_ETC_DIR%\%i%\
+if ErrorLevel 1 set ERROR=%ERROR%,copy-etc-%i%
+REM
+set i=
 goto warnings
 
 :nocopy
@@ -285,6 +320,7 @@
 :usage
 echo.
 echo ***************************************************************************
+REM echo * Usage: make.bat :[X]Emacs-exe-dir: [/copy] [ ^> inst-log.txt 2^>^&1 ]
 echo * Usage: make.bat :[X]Emacs-exe-dir: [/copy]
 echo *
 echo * where: :[X]Emacs-exe-dir: is the directory your
@@ -293,6 +329,8 @@
 echo *           or G:\Emacs\bin
 echo *        /copy indicates that the compiled files should be copied to your
 echo *           emacs lisp, info, and etc site directories.
+REM echo *        ^> inst-log.txt 2^>^&1
+REM echo *           Log output to inst-log.txt
 echo *
 echo * Note: If you have Emacs/w3 you should set the environment variable
 echo *       W3DIR to the directory where w3 is installed eg.
Index: gnus/contrib/ChangeLog
diff -u gnus/contrib/ChangeLog:7.22 gnus/contrib/ChangeLog:7.23
--- gnus/contrib/ChangeLog:7.22	Sat Feb 11 23:25:03 2006
+++ gnus/contrib/ChangeLog	Tue Apr 11 18:22:01 2006
@@ -1,3 +1,7 @@
+2006-04-11  Sascha Wilde  <[email protected]>  (tiny patch)
+
+	* nnir.el (nnir-run-swish++): Allow matching gzipped files.
+
 2006-02-11  Miles Bader  <[email protected]>
 
 	* sendmail.el, smtpmail.el: New files, from Emacs tree.
Index: gnus/contrib/nnir.el
diff -u gnus/contrib/nnir.el:7.9 gnus/contrib/nnir.el:7.10
--- gnus/contrib/nnir.el:7.9	Mon Dec  5 14:45:11 2005
+++ gnus/contrib/nnir.el	Tue Apr 11 18:22:01 2006
@@ -1147,7 +1147,7 @@
               dirnam (file-name-directory (match-string 2)))
 
         ;; don't match directories
-        (when (string-match "^[0-9]+$" artno)
+        (when (string-match "^[0-9]+\\(\\.gz\\)?$" artno)
           (when (not (null dirnam))
 
 	    ;; maybe limit results to matching groups.
Index: gnus/etc/Makefile.in
diff -u gnus/etc/Makefile.in:7.11 gnus/etc/Makefile.in:7.12
--- gnus/etc/Makefile.in:7.11	Tue Feb 21 19:13:26 2006
+++ gnus/etc/Makefile.in	Tue Apr 11 19:17:32 2006
@@ -29,9 +29,11 @@
 	  echo " $(INSTALL_DATA) $$p $(etcdir)/$$p"; \
 	  $(INSTALL_DATA) $$p $(etcdir)/$$p; \
 	done
-	$(SHELL) $(top_srcdir)/mkinstalldirs $(etcdir)/images/smilies
+	$(SHELL) $(top_srcdir)/mkinstalldirs $(etcdir)/images/smilies \
+	  $(etcdir)/images/smilies/grayscale $(etcdir)/images/smilies/medium
 	cd $(srcdir) \
-	&& for p in images/smilies/*.pbm images/smilies/*.xpm; do \
+	&& for p in images/smilies/*.pbm images/smilies/*.xpm \
+            images/smilies/grayscale/*.xpm images/smilies/medium/*.xpm; do \
 	  echo " $(INSTALL_DATA) $$p $(etcdir)/$$p"; \
 	  $(INSTALL_DATA) $$p $(etcdir)/$$p; \
 	done
Index: gnus/etc/images/refresh.xpm
diff -u gnus/etc/images/refresh.xpm:1.1 gnus/etc/images/refresh.xpm:1.2
--- gnus/etc/images/refresh.xpm:1.1	Tue Feb 21 19:09:39 2006
+++ gnus/etc/images/refresh.xpm	Wed Apr 12 07:24:43 2006
@@ -1,113 +1,153 @@
 /* XPM */
-static char * stock_refresh_xpm[] = {
-"24 24 86 1",
-" 	c None",
-".	c #000000",
-"+	c #F3F6F8",
-"@	c #C8D4DF",
-"#	c #F7F9FA",
-"$	c #0D110C",
-"%	c #6286A5",
-"&	c #A0B6C9",
-"*	c #C9D5E0",
-"=	c #F2F5F7",
-"-	c #172116",
-";	c #819EB6",
-">	c #CAD6E1",
-",	c #CCD7E1",
-"'	c #CED9E3",
-")	c #F6F8F9",
-"!	c #7192AE",
-"~	c #587B99",
-"{	c #CDD8E2",
-"]	c #CFDAE4",
-"^	c #D3DDE6",
-"/	c #D5DEE6",
-"(	c #ADC0D0",
-"_	c #90A9BF",
-":	c #537490",
-"<	c #23323E",
-"[	c #85A1B8",
-"}	c #5E83A3",
-"|	c #6084A3",
-"1	c #6689A7",
-"2	c #678AA8",
-"3	c #48657D",
-"4	c #A8BCCD",
-"5	c #7393AE",
-"6	c #6B8DAA",
-"7	c #5C81A1",
-"8	c #5D82A2",
-"9	c #6588A6",
-"0	c #435F76",
-"a	c #B1C3D2",
-"b	c #50718D",
-"c	c #9FB5C8",
-"d	c #94ACC1",
-"e	c #425D73",
-"f	c #435E74",
-"g	c #B4C5D3",
-"h	c #6C8EAB",
-"i	c #C4D2DD",
-"j	c #5B80A0",
-"k	c #456178",
-"l	c #7595B0",
-"m	c #BFCEDA",
-"n	c #597D9C",
-"o	c #A3B8CA",
-"p	c #B0C2D1",
-"q	c #86A2B9",
-"r	c #6E8FAB",
-"s	c #E1E8EE",
-"t	c #B9C9D6",
-"u	c #6387A6",
-"v	c #4C6B85",
-"w	c #7F9DB6",
-"x	c #BCCCD9",
-"y	c #DDE5EC",
-"z	c #E4EAEF",
-"A	c #D8E1E9",
-"B	c #D1DBE4",
-"C	c #C7D3DE",
-"D	c #B7C8D6",
-"E	c #7091AD",
-"F	c #537592",
-"G	c #9DB3C6",
-"H	c #8CA7BD",
-"I	c #304353",
-"J	c #4E6E89",
-"K	c #829FB7",
-"L	c #92ABC0",
-"M	c #C5D3DE",
-"N	c #7C9AB3",
-"O	c #5A7E9D",
-"P	c #47647C",
-"Q	c #6185A4",
-"R	c #5B7F9E",
-"S	c #4F6F8A",
-"T	c #405A71",
-"U	c #283926",
-"       .                ",
-"       ..               ",
-"       .+.              ",
-"    ....@#.             ",
-"   $%&@@**=.     ..     ",
-"  -;@@**>,').   .!~.    ",
-" .%@**>,{]^/(.   ._:.   ",
-" <&@[}}|%123.     .4.   ",
-".5@678|%920.      .ab.  ",
-".cd7e...1f.   .   .gh.  ",
-".ijb.  .k.   ..   .al.  ",
-".mn.   ..   .'.  .op5.  ",
-".qr.   .   .*s...at4u.  ",
-".vw.      .xyzyABCDEF.  ",
-" .G.     .p'B,@ixaH2I.  ",
-" .JK.   .LM@,>>MmNOP.   ",
-"  .F9.   .9|%Q|}7RS..   ",
-"   ..     .|R~~nJT..    ",
-"           .j~....      ",
-"            UO.         ",
-"             ..         ",
-"              .         ",
-"                        ",
-"                        "};
+static char * refresh_xpm[] = {
+"24 24 126 2",
+"  	c None",
+". 	c #000000",
+"+ 	c #F0FFEE",
+"@ 	c #CAE3C6",
+"# 	c #F5FFF4",
+"$ 	c #0D110C",
+"% 	c #729C6C",
+"& 	c #A6CAA1",
+"* 	c #CBE4C7",
+"= 	c #EFFDEE",
+"- 	c #172116",
+"; 	c #88B583",
+"> 	c #CCE5C8",
+", 	c #CDE6C9",
+"' 	c #CFE7CB",
+") 	c #F3FFF2",
+"! 	c #7FA879",
+"~ 	c #689063",
+"{ 	c #CDE5C9",
+"] 	c #CFE7CA",
+"^ 	c #D0E9CC",
+"/ 	c #D4EAD0",
+"( 	c #D5ECD1",
+"_ 	c #AED5A9",
+": 	c #9ABC95",
+"< 	c #63865F",
+"[ 	c #2B3A29",
+"} 	c #8CB887",
+"| 	c #70986A",
+"1 	c #71986B",
+"2 	c #729A6B",
+"3 	c #759C6D",
+"4 	c #759F6F",
+"5 	c #76A170",
+"6 	c #567453",
+"7 	c #AFCBAC",
+"8 	c #7EAB77",
+"9 	c #78A472",
+"0 	c #6F9669",
+"a 	c #70976A",
+"b 	c #71996B",
+"c 	c #739B6D",
+"d 	c #759F6E",
+"e 	c #77A170",
+"f 	c #526F4C",
+"g 	c #B7D2B2",
+"h 	c #60835B",
+"i 	c #A5C9A0",
+"j 	c #9AC195",
+"k 	c #4F6B4C",
+"l 	c #769F70",
+"m 	c #516D4C",
+"n 	c #B9D5B4",
+"o 	c #7BA574",
+"p 	c #C7E0C3",
+"q 	c #6D9568",
+"r 	c #51714E",
+"s 	c #B6D3B2",
+"t 	c #81AB7C",
+"u 	c #C3DBBF",
+"v 	c #6B9265",
+"w 	c #C8EFC3",
+"x 	c #A7CCA2",
+"y 	c #B5D2B1",
+"z 	c #80A87A",
+"A 	c #90B68B",
+"B 	c #79A674",
+"C 	c #C6EAC1",
+"D 	c #DEF7D9",
+"E 	c #B3D7AE",
+"F 	c #BBD9B8",
+"G 	c #AFCCAB",
+"H 	c #749E6D",
+"I 	c #5B7B57",
+"J 	c #8CB087",
+"K 	c #BBE1B6",
+"L 	c #DAF5D6",
+"M 	c #E1F7DD",
+"N 	c #DCF4D6",
+"O 	c #D7F0D3",
+"P 	c #CFECCB",
+"Q 	c #C6E3C3",
+"R 	c #BCD6B9",
+"S 	c #7EA778",
+"T 	c #64885F",
+"U 	c #A6C1A3",
+"V 	c #B3D5AE",
+"W 	c #CDEAC9",
+"X 	c #D0EBCB",
+"Y 	c #CAE9C5",
+"Z 	c #C7E6C3",
+"` 	c #C3E3BF",
+" .	c #BDDCBA",
+"..	c #B5D2B2",
+"+.	c #96B991",
+"@.	c #76A071",
+"#.	c #3A4E37",
+"$.	c #5E7F5A",
+"%.	c #8FAF8B",
+"&.	c #9CBE97",
+"*.	c #C7E0C4",
+"=.	c #CBE3C6",
+"-.	c #CDE4C9",
+";.	c #CBE4C8",
+">.	c #C7E1C4",
+",.	c #C2DBBF",
+"'.	c #88AF82",
+").	c #6B9266",
+"!.	c #557451",
+"~.	c #63885E",
+"{.	c #759C70",
+"].	c #749E6F",
+"^.	c #72996B",
+"/.	c #739A6D",
+"(.	c #71996C",
+"_.	c #6E9668",
+":.	c #6C9367",
+"<.	c #5F815A",
+"[.	c #70996B",
+"}.	c #6E9467",
+"|.	c #698F63",
+"1.	c #6B9166",
+"2.	c #5D8059",
+"3.	c #4D6A49",
+"4.	c #6A8F64",
+"5.	c #283926",
+"              .                                 ",
+"              . .                               ",
+"              . + .                             ",
+"        . . . . @ # .                           ",
+"      $ % & @ @ * * = .           . .           ",
+"    - ; @ @ * * > , ' ) .       . ! ~ .         ",
+"  . % @ * * > { ] ^ / ( _ .       . : < .       ",
+"  [ & @ } | 1 2 3 4 5 6 .           . 7 .       ",
+". 8 @ 9 0 a b c d e f .             . g h .     ",
+". i j 0 k . . . l m .       .       . n o .     ",
+". p q h .     . r .       . .       . s t .     ",
+". u v .       . .       . w .     . x y z .     ",
+". A B .       .       . C D . . . E F G H .     ",
+". I J .             . K L M N O P Q R S T .     ",
+"  . U .           . V W X Y Z `  ...+.@.#..     ",
+"  . $.%..       . &.*.=., -.;.>.,.'.).!..       ",
+"    . ~.{..       . ].^.c /.(.| _.:.<.. .       ",
+"      . .           . [.}.|.~ 1.2.3.. .         ",
+"                      . q 4.. . . .             ",
+"                        5.)..                   ",
+"                          . .                   ",
+"                            .                   ",
+"                                                ",
+"                                                "};
Index: gnus/etc/images/sort-ascending.xpm
diff -u gnus/etc/images/sort-ascending.xpm:1.1 gnus/etc/images/sort-ascending.xpm:1.2
--- gnus/etc/images/sort-ascending.xpm:1.1	Tue Mar  7 15:53:31 2006
+++ gnus/etc/images/sort-ascending.xpm	Wed Apr 12 07:24:43 2006
@@ -1,33 +1,61 @@
 /* XPM */
-static char * stock_sort_ascending_xpm[] = {
-"23 23 7 1",
+static char * sort_ascending_xpm[] = {
+"24 24 34 1",
 " 	c None",
-".	c #314E6C",
-"+	c #000000",
-"@	c #D1DECF",
-"#	c #7DA377",
-"$	c #E4ECE3",
-"%	c #B3C9AF",
-"                       ",
-"   ....                ",
-"  ..  ..               ",
-"  ..  ..               ",
-"  ......               ",
-"  ..  ..               ",
-"  ..  ..               ",
-"                       ",
-"          +            ",
-"                       ",
-"            +          ",
-"                       ",
-"    +         +        ",
-"   +@+   +             ",
-"  +@##+ ++      ++++++ ",
-"   +###+$+         +++ ",
-"    +##%#+        +++  ",
-"     +%##+       +++   ",
-"    +$###+      +++    ",
-"   +++++++      ++++++ ",
-"                       ",
-"                       ",
-"                       "};
+".	c #000000",
+"+	c #FAFAFA",
+"@	c #DDDFD2",
+"#	c #8B8E7C",
+"$	c #E5E7DD",
+"%	c #84A77E",
+"&	c #586546",
+"*	c #81A57C",
+"=	c #EDEEE8",
+"-	c #81A57B",
+";	c #ECEDE6",
+">	c #7EA379",
+",	c #7DA377",
+"'	c #DDDFD3",
+")	c #7DA378",
+"!	c #C9D5C4",
+"~	c #7EA378",
+"{	c #7C7E73",
+"]	c #DFE7DE",
+"^	c #CCDACA",
+"/	c #90B08C",
+"(	c #76986D",
+"_	c #6C855E",
+":	c #22231E",
+"<	c #3F443B",
+"[	c #C8D8C7",
+"}	c #9DB89A",
+"|	c #76966B",
+"1	c #3D4237",
+"2	c #565B4E",
+"3	c #9EBA9A",
+"4	c #3C4237",
+"5	c #5E6154",
+"                        ",
+"                        ",
+"                        ",
+"               ....     ",
+"     .....    ..  ..    ",
+"     .+@#.    ..  ..    ",
+"     .$%&.    ......    ",
+"     .$*&.    ..  ..    ",
+"     .=-&.    ..  ..    ",
+"     .;-&.              ",
+"     .$*&.      ..      ",
+"     .$*&.      ..      ",
+"     .$>&.              ",
+"     .$,&.      ..      ",
+"     .')&.      ..      ",
+"   ...!~&...            ",
+"   .{]^/(_:.  ......    ",
+"    .<[}|1.      ...    ",
+"     .234.      ...     ",
+"      .5.      ...      ",
+"       .      ...       ",
+"              ......    ",
+"                        ",
+"                        "};
Index: gnus/etc/images/sort-descending.xpm
diff -u gnus/etc/images/sort-descending.xpm:1.1 gnus/etc/images/sort-descending.xpm:1.2
--- gnus/etc/images/sort-descending.xpm:1.1	Tue Mar  7 15:53:31 2006
+++ gnus/etc/images/sort-descending.xpm	Wed Apr 12 07:24:43 2006
@@ -1,33 +1,62 @@
 /* XPM */
-static char * stock_sort_descending_xpm[] = {
-"24 23 7 1",
+static char * sort_descending_xpm[] = {
+"24 24 35 1",
 " 	c None",
 ".	c #000000",
-"+	c #D1DECF",
-"@	c #7DA377",
-"#	c #314E6C",
-"$	c #E4ECE3",
-"%	c #B3C9AF",
+"+	c #F8F0EE",
+"@	c #E5B9BB",
+"#	c #895F63",
+"$	c #E7BDBC",
+"%	c #C14B35",
+"&	c #922B34",
+"*	c #C24F3C",
+"=	c #942B32",
+"-	c #E8BFBE",
+";	c #E8C2BF",
+">	c #C34E3B",
+",	c #C24F3A",
+"'	c #C24D38",
+")	c #E5B8B9",
+"!	c #C24F38",
+"~	c #E2B1AA",
+"{	c #CC6B5A",
+"]	c #643C3E",
+"^	c #E3B5AC",
+"/	c #E3B3A9",
+"(	c #D07868",
+"_	c #982E19",
+":	c #7E261F",
+"<	c #120C0F",
+"[	c #2B1D1F",
+"}	c #DFAA9E",
+"|	c #D28575",
+"1	c #7D2617",
+"2	c #321C23",
+"3	c #3B262E",
+"4	c #D68A7A",
+"5	c #321C21",
+"6	c #3F2A35",
 "                        ",
 "                        ",
-"  ......                ",
-"     ...                ",
-"    ...                 ",
-"   ...                  ",
-"  ...                   ",
-"  ......                ",
-"          .             ",
-"                        ",
-"            .           ",
-"                        ",
-"    .         .         ",
-"   .+.   .              ",
-"  .+@@. ..       ####   ",
-"   .@@@.$.      ##  ##  ",
-"    .@@%@.      ##  ##  ",
-"     .%@@.      ######  ",
-"    .$@@@.      ##  ##  ",
-"   .......      ##  ##  ",
 "                        ",
+"              ......    ",
+"     .....       ...    ",
+"     .+@#.      ...     ",
+"     .$%&.     ...      ",
+"     .$*=.    ...       ",
+"     .-*=.    ......    ",
+"     .;>=.              ",
+"     .$*=.      ..      ",
+"     .$*=.      ..      ",
+"     .$,=.              ",
+"     .$'=.      ..      ",
+"     .)!=.      ..      ",
+"   ...~{=...            ",
+"   .]^/(_:<.   ....     ",
+"    .[}|12.   ..  ..    ",
+"     .345.    ..  ..    ",
+"      .6.     ......    ",
+"       .      ..  ..    ",
+"              ..  ..    ",
 "                        ",
 "                        "};
Index: gnus/lisp/ChangeLog
diff -u gnus/lisp/ChangeLog:7.1128 gnus/lisp/ChangeLog:7.1237
--- gnus/lisp/ChangeLog:7.1128	Tue Apr 11 16:17:52 2006
+++ gnus/lisp/ChangeLog	Mon May  1 17:14:44 2006
@@ -1,3 +1,511 @@
+2006-05-01  Lars Magne Ingebrigtsen  <[email protected]>
+
+	* gnus.el (gnus-version-number): Bump version.
+
+2006-05-01 Lars Magne Ingebrigtsen <[email protected]>
+
+	* gnus.el: No Gnus v0.5 is released.
+
+2006-04-30  Andreas Seltenreich  <[email protected]>
+
+	* nnweb.el (nnweb-request-article): Do proper xwfu encoding when
+	fetching articles by message-id.
+
+2006-04-30  Lars Magne Ingebrigtsen  <[email protected]>
+
+	* message.el (hashcash): Require hashcash as normal.
+
+	* ecomplete.el (ecomplete-highlight-match-line): Use
+	point-at-eol. 
+	(ecomplete-highlight-match-line): Use `highlight', because that
+	face exists in both Emacs and XEmacs.
+
+	* message.el (message-display-abbrev): Use point-at-bol.
+
+	* mail-source.el: Don't require timer/timer-funcs.
+
+	* gnus-async.el: Ditto.
+
+	* password.el: Ditto.
+
+	* nnheaderxm.el (nnheader-cancel-timer): Ditto.
+
+	* mm-url.el: Ditto.
+
+	* gnus-xmas.el: Don't require timer-funcs.
+
+	* mm-util.el: Require timer/timer-funcs.
+
+2006-04-23  Andreas Seltenreich  <[email protected]>  (tiny change)
+
+	* mm-url.el (mm-url-insert-file-contents): Don't set Connection:
+	Close.
+
+2006-04-28  Katsumi Yamaoka  <[email protected]>
+
+	* mm-uu.el (mm-uu-pgp-encrypted-extract-1): Assume buffer is made
+	unibyte after clear-decrypt function runs.
+
+	* mml2015.el (mml2015-pgg-clear-decrypt): Treat data which pgg
+	returns as a unibyte string.
+
+2006-04-27  Katsumi Yamaoka  <[email protected]>
+
+	* lpath.el: Revert.
+
+	* pgg-gpg.el (pgg-string-to-multibyte): Remove.
+	(pgg-gpg-process-sentinel): Revert.
+
+	* pgg-pgp.el (pgg-pgp-process-region): Revert.
+	(pgg-pgp-lookup-key): Revert.
+
+	* pgg-pgp5.el (pgg-pgp5-process-region): Revert.
+	(pgg-pgp5-lookup-key): Revert.
+
+	* pgg.el (pgg-fetch-key): Revert.
+
+2006-04-27  Katsumi Yamaoka  <[email protected]>
+
+	* lpath.el: Fbind string-as-multibyte for XEmacs.
+
+	* mml1991.el (mml1991-pgg-sign): No need to load pgg.el, which is
+	always loaded by way of gnus-art.el -> mm-uu.el -> mml2015.el.
+	(mml1991-pgg-encrypt): Ditto.
+
+	* pgg-gpg.el (pgg-string-to-multibyte): New function.
+	(pgg-gpg-process-sentinel): Make sure pgg-output-buffer is always
+	a multibyte buffer.
+
+	* pgg-pgp.el (pgg-pgp-process-region): Ditto.
+	(pgg-pgp-lookup-key): Ditto.
+
+	* pgg-pgp5.el (pgg-pgp5-process-region): Ditto.
+	(pgg-pgp5-lookup-key): Ditto.
+
+	* pgg.el (pgg-fetch-key): Ditto.
+
+2006-04-26  Reiner Steib  <[email protected]>
+
+	* message.el (message-user-organization-file): Check several
+	locations of the organization file.
+
+	* gnus-sum.el (gnus-summary-mime-map, gnus-summary-make-menu-bar):
+	Add gnus-article-view-part-as-type.
+
+	* gnus-art.el (gnus-article-view-part-as-type): New function.
+
+	* message.el (message-valid-fqdn-regexp): Add TLDs .cat, jobs,
+	.mobi and .travel.  Remove .nato, .bitnet and .uucp.
+
+	* mml.el: Simplify autoload.
+	(mml-mode): defvar dnd-protocol-alist instead of using
+	symbol-value.
+	(mml-default-directory): New variable.
+	(mml-minibuffer-read-file): Use it.
+	(mml-dnd-protocol-alist, mml-dnd-attach-options): Adjust :version.
+
+	* message.el (message-citation-line-format): New variable.
+	(message-insert-formated-citation-line): New function.
+	(message-citation-line-function): Add
+	`message-insert-formated-citation-line' to custom type.
+
+	* mm-decode.el (mm-verify-option): Add gnus-buttonized-mime-types
+	to doc string.
+
+	* gnus-art.el (gnus-buttonized-mime-types): Add "multipart/signed"
+	depending on mm-verify-option.
+
+2006-04-26  Katsumi Yamaoka  <[email protected]>
+
+	* mml1991.el (mml1991-pgg-sign): Make sure to load pgg.el before
+	binding pgg-* variables; reimplement the section which prevents
+	MIME header from being signed.
+	(mml1991-pgg-encrypt): Make sure to load pgg.el before binding
+	pgg-text-mode; remove a blank line at the top of body.
+
+	* mm-uu.el (mm-uu-pgp-encrypted-extract-1): Don't remove blank
+	lines at the top of body; use gnus-newsgroup-charset if there's no
+	Charset header.
+
+2006-04-25  Katsumi Yamaoka  <[email protected]>
+
+	* message.el (message-self-insert-commands): Doc fix.
+
+	* mm-uu.el (mm-uu-pgp-signed-test): Erase prompt.
+	(mm-uu-pgp-encrypted-test): Ditto.
+	(mm-uu-pgp-encrypted-extract-1): Make sure there's a blank line
+	between header and body; return application/pgp-encrypted handle
+	if decryption failed; decode decrypted body by charset.
+
+	* mm-decode.el (mm-automatic-display): Don't make application/pgp
+	element match to application/pgp-*.
+
+2006-04-23  Andreas Seltenreich  <[email protected]>  (tiny change)
+
+	* nnweb.el (nnweb-google-wash-article): Sync up to new Google
+	HTML.
+
+2006-04-23  Lars Magne Ingebrigtsen  <[email protected]>
+
+	* mail-source.el (mail-source-call-script): Message the error
+	string.
+
+2006-04-22  Lars Magne Ingebrigtsen  <[email protected]>
+
+	* gnus-util.el (gnus-byte-compile): Use it.
+
+2006-04-22  xyblor  <[email protected]>  (Tiny change.)
+
+	* gnus-util.el (kill-empty-logs): New function.
+
+2006-04-22  Lars Magne Ingebrigtsen  <[email protected]>
+
+	* message.el (message-mail-alias-type): Doc fix.
+	(message-mail-alias-type-p): New function.
+	(message-send): Use it.
+	(message-mode): Ditto.
+	(message-strip-forbidden-properties): Ditto.
+
+	* ecomplete.el (ecomplete-database-file-coding-system): New
+	variable.
+	(ecomplete-save): Use it.
+	(ecomplete-setup): Use it.
+
+2006-04-22  Katsumi Yamaoka  <[email protected]>
+
+	* message.el (message-self-insert-commands): New variable.
+	(message-strip-forbidden-properties): Use it.
+
+2006-04-22  Lars Magne Ingebrigtsen  <[email protected]>
+
+	* message.el (message-put-addresses-in-ecomplete): Use a regexp
+	that doesn't make XEmacs choke.
+
+2006-04-20  Reiner Steib  <[email protected]>
+
+	* gnus-util.el (gnus-replace-in-string): Prefer
+	replace-regexp-in-string over of replace-in-string.
+
+2006-04-20  Katsumi Yamaoka  <[email protected]>
+
+	* gnus-util.el (gnus-select-frame-set-input-focus): Use
+	select-frame-set-input-focus if it is available in XEmacs; use
+	definition defined in Emacs 22 for old Emacsen.
+
+	* dgnushack.el: Autoload unmorse-region for XEmacs.
+
+	* lpath.el: Bind cursor-in-non-selected-windows and
+	select-frame-set-input-focus for XEmacs.
+
+2006-04-19  Katsumi Yamaoka  <[email protected]>
+
+	* mm-view.el (mm-inline-text): Use equal instead of equalp.
+
+2006-04-18  Teodor Zlatanov  <[email protected]>
+
+	* gnus-registry.el (gnus-registry-cache-save): remove text
+	properties when saving via the temp buffer
+
+2006-04-18  Reiner Steib  <[email protected]>
+
+	* message.el (message-generate-hashcash): Honor custom type.
+
+2006-04-18  Lars Magne Ingebrigtsen  <[email protected]>
+
+	* message.el (message-generate-hashcash): Default to non-nil when
+	hashcash is found.
+
+	* gnus-sum.el (gnus-summary-expire-articles-now): Clarify prompt.
+	(gnus-refer-thread-limit): Increase default to 500.
+
+	* mm-view.el (mm-inline-text): Supply delsp to flow-fill.
+
+	* flow-fill.el (fill-flowed): Allow delete-space.
+
+2006-04-18  Reiner Steib  <[email protected]>
+
+	* deuglify.el (gnus-outlook-deuglify-unwrap-min)
+	(gnus-outlook-deuglify-unwrap-max, gnus-outlook-display-hook):
+	Remove autoloads.
+
+2006-04-18  Simon Josefsson  <[email protected]>
+
+	* message.el (message-generate-hashcash): Default to.
+
+2006-04-18  Katsumi Yamaoka  <[email protected]>
+
+	* rfc2231.el (rfc2231-parse-string): Decode encoded value after
+	concatenating segments rather than before concatenating them.
+
+2006-04-17  Reiner Steib  <[email protected]>
+
+	* gnus-group.el: Move comment to gnus-group-update-tool-bar.
+
+2006-04-17  Lars Magne Ingebrigtsen  <[email protected]>
+
+	* rfc2231.el (rfc2231-parse-string): Sort the parameters first.
+
+	* message.el (message-forward-make-body-plain): Allow
+	message-forward-ignored-headers to be a list.
+	(message-remove-ignored-headers): Factor out into function.
+	(message-forward-make-body-mml): Use it.
+
+	* imap.el (imap-quote-specials): New function.
+	(imap-login-auth): Quote specials.
+
+	* rfc2231.el (rfc2231-parse-string): Remove dead code.
+	(rfc2231-parse-string): Allow concatanation of parameters that
+	aren't contiguous.  The test case is
+	  (mail-header-parse-content-type "message/external-body;
+            name*0*=us-ascii''~%2ffoo%2fbar%2fbaz%2fxyzzy%2f;
+            access-type=LOCAL-FILE;
+            name*1*=plugh%2fhello-sailor%2fbing.pdf")
+
+2006-04-17  Stefan Monnier  <[email protected]>
+
+	* nntp.el (nntp-accept-process-output): Return the value of
+	`nnheader-accept-process-output'.
+
+2006-04-17  Lars Magne Ingebrigtsen  <[email protected]>
+
+	* gnus-art.el (gnus-article-treat-types): Add text/x-patch.
+	(gnus-button-alist): Recognize more diff formats.
+	(gnus-button-patch): Strip directory.
+
+2006-04-17  Reiner Steib  <[email protected]>
+
+	* gnus-util.el (gnus-select-frame-set-input-focus): Check for
+	Emacs 22 when setting focus.
+
+2006-04-17  Lars Magne Ingebrigtsen  <[email protected]>
+
+	* gnus-art.el (gnus-article-treat-types): Do treatment of
+	text/x-verbatim parts.
+	(gnus-button-patch): New command.
+
+	* ietf-drums.el (ietf-drums-parse-address): Attempt parsing
+	addresses that contain invalid characters.
+
+2006-04-16  Lars Magne Ingebrigtsen  <[email protected]>
+
+	* message.el (message-put-addresses-in-ecomplete): Use
+	gnus-replace-in-string.
+	(message-is-yours-p): Use the more correct
+	mail-header-parse-address instead of
+	mail-extract-address-components.
+	(message-put-addresses-in-ecomplete): Fix typo.
+
+	* gnus-sum.el (gnus-summary-limit-to-bodies): New command and
+	keystroke.
+
+	* gnus-art.el (gnus-treatment-function-alist): Change order of
+	newsgroups/generic header folding to avoid double-folding.
+
+	* message.el (message-hidden-headers): Add X-Draft-From.
+
+	* gnus-sum.el (gnus-summary-repeat-search-article-forward): New
+	command.
+	(gnus-summary-repeat-search-article-backward): New command.
+
+	* gnus-topic.el (gnus-topic-display-missing-topic): Skip past
+	groups in the parent topic.
+
+2006-04-16  Jo,Ac(Bo Cachopo  <[email protected]>  (tiny change)
+
+	* spam.el (spam-necessary-extra-headers): Add X-CRM114-Status.
+	(spam-extra-header-to-number): Return the CRM114 number as a
+	number instead of a string.
+
+2006-04-16  Lars Magne Ingebrigtsen  <[email protected]>
+
+	* gnus-art.el (gnus-face-properties-alist): Moved here from
+	gnus-fun.
+
+	* gnus-fun.el (gnus-face-properties-alist): Move to gnus-art.
+
+2006-04-15  Lars Magne Ingebrigtsen  <[email protected]>
+
+	* message.el (message-strip-forbidden-properties): Only display on
+	self-insert-command.
+
+	* hashcash.el (hashcash-insert-payment-async): Remove dead code;
+	reindent.
+	(hashcash-insert-payment-async-2): Make sure the buffer is alive.
+
+2006-04-15  NAKAJI Hiroyuki  <[email protected]>  (tiny change)
+
+	* smiley.el (smiley-style): Fix typo.
+
+2006-04-15  Lars Magne Ingebrigtsen  <[email protected]>
+
+	* hashcash.el (hashcash-insert-payment-async-2): Use
+	message-goto-eoh instead of doing it manually.
+	(mail-add-payment): Use message-narrow-to-header instead of trying
+	to do the same itself.
+
+	* message.el (message-hidden-headers): Add Face.
+
+	* gnus-sum.el (gnus-summary-reparent-thread): Factor out
+	reparenting code.
+	(gnus-summary-reparent-children): Refactored out code.
+	(gnus-summary-thread-map): New keystroke.
+	(gnus-summary-reparent-children): Make into command.
+
+	* smiley.el (smiley-style): Default to `medium' if using a large
+	font.
+
+	* gnus-sum.el (unmorse-region): Remove autoload, because morse.el
+	does it itself.
+
+	* message.el (message-point-in-header-p): Simplify definition.
+
+2006-04-14  Lars Magne Ingebrigtsen  <[email protected]>
+
+	* nnagent.el (nnagent-request-set-mark): Silence log file
+	writing.
+	(nnagent-request-set-mark): Use write-region instead of
+	append-to-file.
+
+	* gnus-sum.el (gnus-read-header): Fudge article number if using a
+	strange select method.
+
+	* ecomplete.el (ecomplete-display-matches): Get highlightling
+	right.
+	(ecomplete-display-matches): Use literals.
+	(ecomplete-display-matches): Disable message logging.
+
+	* message.el (message-display-abbrev): Small optimization.
+
+	* ecomplete.el (ecomplete-display-matches): Allow automatic
+	display.
+
+	* message.el (message-strip-forbidden-properties): Display
+	abbrevs.
+	(message-display-abbrev): Get automatic display right.
+
+	* ecomplete.el (ecomplete-display-matches): Use M-n/M-p
+	keystrokes.
+
+2006-04-13  Romain Francoise  <[email protected]>
+
+	* gnus-util.el (gnus-alist-to-hashtable, gnus-hashtable-to-alist):
+	Moved here (and renamed) from gnus-registry.el.
+
+	* gnus-registry.el: Require gnus-util.
+	Use `gnus-alist-to-hashtable' and `gnus-hashtable-to-alist'.
+
+2006-04-13  Lars Magne Ingebrigtsen  <[email protected]>
+
+	* gnus-group.el (gnus-group-catchup-current): Change
+	if-then-else-if-then-else into cond.
+	(gnus-group-catchup): Indent.
+	(group-name-at-point): New function.
+	(gnus-fetch-group): Provide default from thing at point.
+
+2006-04-12  Lars Magne Ingebrigtsen  <[email protected]>
+
+	* message.el (message-display-abbrev): Fix regexp.
+
+	* ecomplete.el (ecomplete-highlight-match-line): Reimplement
+	choosing.
+	(ecomplete-highlight-match-line): Fix up code rewrite, remove
+	dead variables.
+
+	* message.el (message-newline-and-indent): Remove debugging.
+	(message-display-abbrev): Use new implementation.
+
+2006-04-12  Reiner Steib  <[email protected]>
+
+	* gnus-art.el (gnus-article-mode): Set
+	cursor-in-non-selected-windows to nil.
+
+	* smiley.el: Revert previous change.
+	(smiley-data-directory): defvar it before using it in the
+	defcustom of `smiley-style'.
+
+2006-04-12  Lars Magne Ingebrigtsen  <[email protected]>
+
+	* message.el (message-newline-and-indent): New function.
+
+	* ecomplete.el: Implement more bits.
+
+	* message.el (message-put-addresses-in-ecomplete): Clean up the
+	string.
+
+	* ecomplete.el (ecomplete-add-item): Chop off decimals.
+
+	* gnus-sum.el (gnus-summary-save-parts): Bind
+	gnus-summary-save-parts-counter and use it to make unique file
+	names.
+
+	* gnus-art.el (gnus-ignored-headers): Add some more headers.
+
+	* ietf-drums.el (ietf-drums-parse-addresses): Take a RAWP
+	parameter to say whether to actually parse the individual
+	addresses.
+
+	* message.el (message-put-addresses-in-ecomplete): New function.
+	(ecomplete): Require.
+	(message-mail-alias-type): Add ecomplete as an option.
+
+2006-04-12  Ralf Angeli  <[email protected]>
+
+	* flow-fill.el (fill-flowed): Remove trailing space from blank
+	quoted lines.
+
+2006-04-12  Lars Magne Ingebrigtsen  <[email protected]>
+
+	* smiley.el (smiley-style): Move definition later to avoid a
+	compilation warning.
+
+2006-04-12  Kenichi Handa  <[email protected]>
+
+	* rfc2231.el (rfc2231-decode-encoded-string): Work on unibyte
+	buffer and then decode the buffer text if necessary.
+	(rfc2231-encode-string): Be sure to work on multibyte buffer at
+	first, and after mm-encode-body, change the buffer to unibyte.
+	Use mm-disable-multibyte instead of set-buffer-multibyte.
+
+2006-04-12  Katsumi Yamaoka  <[email protected]>
+
+	* gnus-art.el (gnus-mime-copy-part): Find name parameter in
+	Content-Type header instead of Content-Disposition header.
+	(gnus-mime-inline-part): Ditto.
+	(gnus-mime-view-part-as-charset): Ignore charset that the part
+	specifies.
+
+	* mm-decode.el (mm-display-part): Work with external parts and
+	usual parts similarly.
+
+	* mm-extern.el (mm-inline-external-body): Use mm-display-part
+	instead of gnus-display-mime.
+
+	* mm-util.el (mm-decompress-buffer): Use mm-with-unibyte-buffer
+	instead of with-temp-buffer.
+
+	* gnus-uu.el (gnus-uu-save-article): Put mml tags instead of part
+	tag to summarized topics part in order to encode non-ASCII text.
+
+2006-04-11  Reiner Steib  <[email protected]>
+
+	* smiley.el (smiley-style): New variable.
+	(smiley-directory): New function.
+	(smiley-data-directory): Derive from `smiley-style' using
+	`smiley-directory'.
+	(smiley-regexp-alist): Add new entries.
+
+	* gnus-art.el (gnus-button-valid-localpart-regexp): Exclude `@'.
+	(gnus-article-browse-delete-temp): Add :version.
+
+2006-04-11  Arne J,Ax(Brgensen  <[email protected]>
+
+	* gnus-sieve.el (gnus-sieve-generate): Delete from the start of
+	the sieve region.
+
+2006-04-11  Lars Magne Ingebrigtsen  <[email protected]>
+
+	* gnus.el (gnus-version-number): Bump version.
+
 2006-04-11  Reiner Steib  <[email protected]>
 
 	* gnus.el: No Gnus v0.4 is released.
Index: gnus/lisp/deuglify.el
diff -u gnus/lisp/deuglify.el:7.11 gnus/lisp/deuglify.el:7.12
--- gnus/lisp/deuglify.el:7.11	Wed Feb  8 05:17:15 2006
+++ gnus/lisp/deuglify.el	Tue Apr 18 17:36:59 2006
@@ -234,14 +234,12 @@
   :version "22.1"
   :group 'gnus)
 
-;;;###autoload
 (defcustom gnus-outlook-deuglify-unwrap-min 45
   "Minimum length of the cited line above the (possibly) wrapped line."
   :version "22.1"
   :type 'integer
   :group 'gnus-outlook-deuglify)
 
-;;;###autoload
 (defcustom gnus-outlook-deuglify-unwrap-max 95
   "Maximum length of the cited line after unwrapping."
   :version "22.1"
@@ -288,7 +286,6 @@
   :type 'string
   :group 'gnus-outlook-deuglify)
 
-;;;###autoload
 (defcustom gnus-outlook-display-hook nil
   "A hook called after an deuglified article has been prepared.
 It is run after `gnus-article-prepare-hook'."
Index: gnus/lisp/dgnushack.el
diff -u gnus/lisp/dgnushack.el:7.22 gnus/lisp/dgnushack.el:7.23
--- gnus/lisp/dgnushack.el:7.22	Thu Mar  2 08:45:27 2006
+++ gnus/lisp/dgnushack.el	Thu Apr 20 03:08:38 2006
@@ -233,6 +233,7 @@
     (autoload 'sort-numeric-fields "sort" nil t)
     (autoload 'sort-subr "sort")
     (autoload 'trace-function-background "trace" nil t)
+    (autoload 'unmorse-region "morse" nil t)
     (autoload 'w3-do-setup "w3")
     (autoload 'w3-prepare-buffer "w3-display")
     (autoload 'w3-region "w3-display" nil t)
Index: gnus/lisp/flow-fill.el
diff -u gnus/lisp/flow-fill.el:7.17 gnus/lisp/flow-fill.el:7.19
--- gnus/lisp/flow-fill.el:7.17	Fri Feb 24 17:00:15 2006
+++ gnus/lisp/flow-fill.el	Tue Apr 18 19:30:09 2006
@@ -98,16 +98,18 @@
       t)))
 
 ;;;###autoload
-(defun fill-flowed (&optional buffer)
+(defun fill-flowed (&optional buffer delete-space)
   (save-excursion
     (set-buffer (or (current-buffer) buffer))
     (goto-char (point-min))
     ;; Remove space stuffing.
-    (while (re-search-forward "^ " nil t)
+    (while (re-search-forward "^\\( \\|>+ $\\)" nil t)
       (delete-char -1)
       (forward-line 1))
     (goto-char (point-min))
     (while (re-search-forward " $" nil t)
+      (when delete-space
+	(delete-char -1))
       (when (save-excursion
 	      (beginning-of-line)
 	      (looking-at "^\\(>*\\)\\( ?\\)"))
Index: gnus/lisp/gnus-art.el
diff -u gnus/lisp/gnus-art.el:7.156 gnus/lisp/gnus-art.el:7.168
--- gnus/lisp/gnus-art.el:7.156	Fri Mar 17 11:43:26 2006
+++ gnus/lisp/gnus-art.el	Wed Apr 26 17:32:25 2006
@@ -158,7 +158,10 @@
      "X-Virus-Scanned" "X-Delivery-Agent" "Posted-Date" "X-Gateway"
      "X-Local-Origin" "X-Local-Destination" "X-UserInfo1"
      "X-Received-Date" "X-Hashcash" "Face" "X-DMCA-Notifications"
-     "X-Abuse-and-DMCA-Info" "X-Postfilter" "X-Gpg-.*" "X-Disclaimer"))
+     "X-Abuse-and-DMCA-Info" "X-Postfilter" "X-Gpg-.*" "X-Disclaimer"
+     "Envelope-To" "X-Spam-Score" "System-Type" "X-Injected-Via-Gmane"
+     "X-Gmane-NNTP-Posting-Host" "Jabber-ID" "Archived-At"
+     "Envelope-Sender" "Envelope-Recipients"))
   "*All headers that start with this regexp will be hidden.
 This variable can also be a list of regexps of headers to be ignored.
 If `gnus-visible-headers' is non-nil, this variable will be ignored."
@@ -791,6 +794,31 @@
 			       (item :tag "skip" nil)
 			       (face :value default)))))
 
+(defcustom gnus-face-properties-alist (if (featurep 'xemacs)
+					  '((xface . (:face gnus-x-face)))
+					'((pbm . (:face gnus-x-face))
+					  (png . nil)))
+  "Alist of image types and properties applied to Face and X-Face images.
+Here are examples:
+
+;; Specify the altitude of Face images in the From header.
+\(setq gnus-face-properties-alist
+      '((pbm . (:face gnus-x-face :ascent 80))
+	(png . (:ascent 80))))
+
+;; Show Face images as pressed buttons.
+\(setq gnus-face-properties-alist
+      '((pbm . (:face gnus-x-face :relief -2))
+	(png . (:relief -2))))
+
+See the manual for the valid properties for various image types.
+Currently, `pbm' is used for X-Face images and `png' is used for Face
+images in Emacs.  Only the `:face' property is effective on the `xface'
+image type in XEmacs if it is built with the libcompface library."
+  :version "23.0" ;; No Gnus
+  :group 'gnus-article-headers
+  :type '(repeat (cons :format "%v" (symbol :tag "Image type") plist)))
+
 (defcustom gnus-article-decode-hook
   '(article-decode-charset article-decode-encoded-words
 			   article-decode-group-name article-decode-idna-rhs)
@@ -842,7 +870,8 @@
   :group 'gnus-article-mime
   :type '(repeat regexp))
 
-(defcustom gnus-buttonized-mime-types nil
+(defcustom gnus-buttonized-mime-types (unless (eq mm-verify-option 'never)
+					'("multipart/signed"))
   "List of MIME types that should be given buttons when rendered inline.
 If set, this variable overrides `gnus-unbuttonized-mime-types'.
 To see e.g. security buttons you could set this to
@@ -984,7 +1013,8 @@
   '(choice (const :tag "Off" nil)
 	   (const :tag "Header" head)))
 
-(defvar gnus-article-treat-types '("text/plain")
+(defvar gnus-article-treat-types '("text/plain" "text/x-verbatim"
+				   "text/x-patch")
   "Parts to treat.")
 
 (defvar gnus-inhibit-treatment nil
@@ -1572,8 +1602,8 @@
     (gnus-treat-overstrike gnus-article-treat-overstrike)
     (gnus-treat-ansi-sequences gnus-article-treat-ansi-sequences)
     (gnus-treat-unfold-headers gnus-article-treat-unfold-headers)
-    (gnus-treat-fold-headers gnus-article-treat-fold-headers)
     (gnus-treat-fold-newsgroups gnus-article-treat-fold-newsgroups)
+    (gnus-treat-fold-headers gnus-article-treat-fold-headers)
     (gnus-treat-buttonize-head gnus-article-add-buttons-to-head)
     (gnus-treat-display-smileys gnus-treat-smiley)
     (gnus-treat-capitalize-sentences gnus-article-capitalize-sentences)
@@ -2618,6 +2648,7 @@
 on each file, if it is `ask' ask once when exiting from the
 summary buffer."
   :group 'gnus-article
+  :version "23.0" ;; No Gnus
   :type '(choice (const :tag "Don't delete" nil)
 		 (const :tag "Don't ask" t)
 		 (const :tag "Ask" ask)
@@ -3946,6 +3977,7 @@
   (make-local-variable 'gnus-article-ignored-charsets)
   ;; Prevent recent Emacsen from displaying non-break space as "\ ".
   (set (make-local-variable 'nobreak-char-display) nil)
+  (setq cursor-in-non-selected-windows nil)
   (gnus-set-default-directory)
   (buffer-disable-undo)
   (setq buffer-read-only t
@@ -4507,7 +4539,7 @@
   (unless handle
     (setq handle (get-text-property (point) 'gnus-data)))
   (when handle
-    (let ((filename (or (mail-content-type-get (mm-handle-disposition handle)
+    (let ((filename (or (mail-content-type-get (mm-handle-type handle)
 					       'name)
 			(mail-content-type-get (mm-handle-disposition handle)
 					       'filename)))
@@ -4601,7 +4633,7 @@
 	  (mm-insert-part handle)
 	  (setq contents
 		(or (mm-decompress-buffer
-		     (or (mail-content-type-get (mm-handle-disposition handle)
+		     (or (mail-content-type-get (mm-handle-type handle)
 						'name)
 			 (mail-content-type-get (mm-handle-disposition handle)
 						'filename))
@@ -4643,19 +4675,29 @@
 specified charset."
   (interactive (list nil current-prefix-arg))
   (gnus-article-check-buffer)
-  (let* ((handle (or handle (get-text-property (point) 'gnus-data)))
-	 contents charset
-	 (b (point))
-	 (inhibit-read-only t))
+  (let ((handle (or handle (get-text-property (point) 'gnus-data)))
+	(fun (get-text-property (point) 'gnus-callback))
+	(gnus-newsgroup-ignored-charsets 'gnus-all)
+	gnus-newsgroup-charset type charset)
     (when handle
       (if (mm-handle-undisplayer handle)
 	  (mm-remove-part handle))
-      (let ((gnus-newsgroup-charset
-	     (or (cdr (assq arg
-			    gnus-summary-show-article-charset-alist))
-		 (mm-read-coding-system "Charset: ")))
-	  (gnus-newsgroup-ignored-charsets 'gnus-all))
-	(gnus-article-press-button)))))
+      (when fun
+	(setq gnus-newsgroup-charset
+	      (or (cdr (assq arg gnus-summary-show-article-charset-alist))
+		  (mm-read-coding-system "Charset: ")))
+	;; Strip the charset parameter from `handle'.
+	(setq type (mm-handle-type
+		    (if (equal (mm-handle-media-type handle)
+			       "message/external-body")
+			(progn
+			  (unless (mm-handle-cache handle)
+			    (mm-extern-cache-contents handle))
+			  (mm-handle-cache handle))
+		      handle))
+	      charset (assq 'charset (cdr type)))
+	(delq charset type)
+	(funcall fun handle)))))
 
 (defun gnus-mime-view-part-externally (&optional handle)
   "View the MIME part under point with an external viewer."
@@ -4817,6 +4859,12 @@
   (interactive "p")
   (gnus-article-part-wrapper n 'gnus-mime-delete-part t))
 
+(defun gnus-article-view-part-as-type (n)
+  "Choose a MIME media type, and view part N as such.
+N is the numerical prefix."
+  (interactive "p")
+  (gnus-article-part-wrapper n 'gnus-mime-view-part-as-type t))
+
 (defun gnus-article-mime-match-handle-first (condition)
   (if condition
       (let (n)
@@ -6203,7 +6251,7 @@
 
 ;; Regexp suggested by Felix Wiemann in <[email protected]>
 (defcustom gnus-button-valid-localpart-regexp
-  "[a-z0-9$%(*-=?[_][^<>\")!;:,{}\n\t ]*"
+  "[a-z0-9$%(*-=?[_][^<>\")!;:,{}\n\t @]*"
   "Regular expression that matches a localpart of mail addresses or MIDs."
   :version "22.1"
   :group 'gnus-article-buttons
@@ -6684,6 +6732,13 @@
     ;; SoWWWAnchor(3iv), XSelectInput(3X11), X(1), X(7)
     ("\\b\\(\\(?:[a-z][-+_.:a-z0-9]+([1-9][X1a-z]*)\\)\\|\\b\\(?:X([1-9])\\)\\)\\W"
      0 (>= gnus-button-man-level 5) gnus-button-handle-man 1)
+    ;; Recognizing patches to .el files.  This is somewhat obscure,
+    ;; but considering the percentage of Gnus users who hack Emacs
+    ;; Lisp files...
+    ("^--- \\([^ .]+\\.el\\).*\n.*\n@@ -?\\([0-9]+\\)" 1
+     (>= gnus-button-message-level 4) gnus-button-patch 1 2)
+    ("^\\*\\*\\* \\([^ .]+\\.el\\).*\n.*\n\\*+\n\\*\\*\\* \\([0-9]+\\)" 1
+     (>= gnus-button-message-level 4) gnus-button-patch 1 2)
     ;; MID or mail: To avoid too many false positives we don't try to catch
     ;; all kind of allowed MIDs or mail addresses.  Domain part must contain
     ;; at least one dot.  TLD must contain two or three chars or be a know TLD
@@ -7048,6 +7103,15 @@
 	  (gnus-summary-refer-article message-id))))
      (group
       (gnus-button-fetch-group url)))))
+
+(defun gnus-button-patch (library line)
+  "Visit an Emacs Lisp library LIBRARY on line LINE."
+  (interactive)
+  (let ((file (locate-library (file-name-nondirectory library))))
+    (unless file
+      (error "Couldn't find library %s" library))
+    (find-file file)
+    (goto-line (string-to-number line))))
 
 (defun gnus-button-handle-man (url)
   "Fetch a man page."
Index: gnus/lisp/gnus-async.el
diff -u gnus/lisp/gnus-async.el:7.8 gnus/lisp/gnus-async.el:7.9
--- gnus/lisp/gnus-async.el:7.8	Wed Feb  8 05:17:15 2006
+++ gnus/lisp/gnus-async.el	Sun Apr 30 11:44:06 2006
@@ -33,10 +33,6 @@
 (require 'gnus-sum)
 (require 'nntp)
 
-(eval-when-compile
-  (when (featurep 'xemacs)
-    (require 'timer-funcs)))
-
 (defgroup gnus-asynchronous nil
   "Support for asynchronous operations."
   :group 'gnus)
Index: gnus/lisp/gnus-demon.el
diff -u gnus/lisp/gnus-demon.el:7.8 gnus/lisp/gnus-demon.el:7.9
--- gnus/lisp/gnus-demon.el:7.8	Wed Feb  8 05:17:15 2006
+++ gnus/lisp/gnus-demon.el	Sun Apr 30 11:44:06 2006
@@ -35,10 +35,6 @@
 (require 'nntp)
 (require 'nnmail)
 (require 'gnus-util)
-(eval-and-compile
-  (if (featurep 'xemacs)
-      (require 'timer-funcs)
-    (require 'timer)))
 
 (autoload 'parse-time-string "parse-time" nil nil)
 
Index: gnus/lisp/gnus-fun.el
diff -u gnus/lisp/gnus-fun.el:7.15 gnus/lisp/gnus-fun.el:7.16
--- gnus/lisp/gnus-fun.el:7.15	Thu Apr  6 23:01:03 2006
+++ gnus/lisp/gnus-fun.el	Sun Apr 16 09:30:34 2006
@@ -78,31 +78,6 @@
 			"convert -scale 48x48! %s -colors %d png:-")
 		 (string)))
 
-(defcustom gnus-face-properties-alist (if (featurep 'xemacs)
-					  '((xface . (:face gnus-x-face)))
-					'((pbm . (:face gnus-x-face))
-					  (png . nil)))
-  "Alist of image types and properties applied to Face and X-Face images.
-Here are examples:
-
-;; Specify the altitude of Face images in the From header.
-\(setq gnus-face-properties-alist
-      '((pbm . (:face gnus-x-face :ascent 80))
-	(png . (:ascent 80))))
-
-;; Show Face images as pressed buttons.
-\(setq gnus-face-properties-alist
-      '((pbm . (:face gnus-x-face :relief -2))
-	(png . (:relief -2))))
-
-See the manual for the valid properties for various image types.
-Currently, `pbm' is used for X-Face images and `png' is used for Face
-images in Emacs.  Only the `:face' property is effective on the `xface'
-image type in XEmacs if it is built with the libcompface library."
-  :version "23.0" ;; No Gnus
-  :group 'gnus-fun
-  :type '(repeat (cons :format "%v" (symbol :tag "Image type") plist)))
-
 (defun gnus-shell-command-to-string (command)
   "Like `shell-command-to-string' except not mingling ERROR."
   (with-output-to-string
Index: gnus/lisp/gnus-group.el
diff -u gnus/lisp/gnus-group.el:7.80 gnus/lisp/gnus-group.el:7.85
--- gnus/lisp/gnus-group.el:7.80	Fri Mar 31 21:09:14 2006
+++ gnus/lisp/gnus-group.el	Tue Apr 18 02:57:20 2006
@@ -1090,17 +1090,6 @@
   :set 'gnus-group-tool-bar-update
   :group 'gnus-group)
 
-;; FIXME: Moving through the Group buffer (in topic mode) e.g. with C-n
-;; doesn't update the state (enabled/disabled) of the icon
-;; `gnus-group-describe-group'.  After `C-l' the state is correct.
-;; See the following report on emacs-devel
-;; <http://thread.gmane.org/[email protected]>:
-;; From: Reiner Steib
-;; Subject: tool bar icons not updated according to :active condition
-;; Newsgroups: gmane.emacs.devel
-;; Date: Mon, 23 Jan 2006 19:59:13 +0100
-;; Message-ID: <[email protected]>
-
 (defcustom gnus-group-tool-bar-zap-list t
   "List of icon items from the global tool bar.
 These items are not displayed in the Gnus group mode tool bar.
@@ -1507,6 +1496,17 @@
 		(gnus-range-difference (list active) (gnus-info-read info))
 		seen))))))
 
+;; Moving through the Group buffer (in topic mode) e.g. with C-n doesn't
+;; update the state (enabled/disabled) of the icon `gnus-group-describe-group'
+;; automatically.  After `C-l' the state is correct.  See the following report
+;; on emacs-devel
+;; <http://thread.gmane.org/[email protected]>:
+;; From: Reiner Steib
+;; Subject: tool bar icons not updated according to :active condition
+;; Newsgroups: gmane.emacs.devel
+;; Date: Mon, 23 Jan 2006 19:59:13 +0100
+;; Message-ID: <[email protected]>
+
 (defcustom gnus-group-update-tool-bar
   (and (not (featurep 'xemacs))
        (boundp 'tool-bar-mode)
@@ -2108,11 +2108,26 @@
     (gnus-group-read-ephemeral-group
      (gnus-group-prefixed-name group method) method)))
 
+(defun group-name-at-point ()
+  (let ((regexp "[^-a-zA-Z+.:_]"))
+    (save-excursion
+      (buffer-substring
+       (progn
+	 (re-search-backward regexp nil t)
+	 (forward-char 1)
+	 (point))
+       (progn
+	 (re-search-forward regexp nil t)
+	 (forward-char -1)
+	 (point))))))
+
 ;;;###autoload
 (defun gnus-fetch-group (group &optional articles)
   "Start Gnus if necessary and enter GROUP.
 Returns whether the fetching was successful or not."
-  (interactive (list (completing-read "Group name: " gnus-active-hashtb)))
+  (interactive (list (completing-read "Group name: " gnus-active-hashtb
+				      nil nil nil nil
+				      (group-name-at-point))))
   (unless (get-buffer gnus-group-buffer)
     (gnus-no-server))
   (gnus-group-read-group articles nil group))
@@ -3332,13 +3347,15 @@
 	  (when (eq 'nnvirtual (car method))
 	    (nnvirtual-catchup-group
 	     (gnus-group-real-name group) (nth 1 method) all)))
-	(if (>= (gnus-group-level group) gnus-level-zombie)
-	    (gnus-message 2 "Dead groups can't be caught up")
-	  (if (prog1
-		  (gnus-group-goto-group group)
-		(gnus-group-catchup group all))
-	      (gnus-group-update-group-line)
-	    (setq ret (1+ ret)))))
+	(cond
+	 ((>= (gnus-group-level group) gnus-level-zombie)
+	  (gnus-message 2 "Dead groups can't be caught up"))
+	 ((prog1
+	      (gnus-group-goto-group group)
+	    (gnus-group-catchup group all))
+	  (gnus-group-update-group-line))
+	 (t
+	  (setq ret (1+ ret)))))
       (gnus-group-next-unread-group 1)
       ret)))
 
@@ -3376,10 +3393,12 @@
 	(gnus-add-marked-articles group 'dormant nil nil 'force))
       ;; Do auto-expirable marks if that's required.
       (when (gnus-group-auto-expirable-p group)
-        (gnus-range-map (lambda (article)
-                          (gnus-add-marked-articles group 'expire (list article))
-                          (gnus-request-set-mark group (list (list (list article) 'add '(expire)))))
-                        unread))
+        (gnus-range-map
+	 (lambda (article)
+	   (gnus-add-marked-articles group 'expire (list article))
+	   (gnus-request-set-mark group (list (list (list article)
+						    'add '(expire)))))
+	 unread))
       (let ((gnus-newsgroup-name group))
 	(gnus-run-hooks 'gnus-group-catchup-group-hook))
       num)))
Index: gnus/lisp/gnus-registry.el
diff -u gnus/lisp/gnus-registry.el:7.27 gnus/lisp/gnus-registry.el:7.29
--- gnus/lisp/gnus-registry.el:7.27	Wed Feb  8 05:17:15 2006
+++ gnus/lisp/gnus-registry.el	Tue Apr 18 23:06:28 2006
@@ -60,6 +60,7 @@
 (require 'gnus)
 (require 'gnus-int)
 (require 'gnus-sum)
+(require 'gnus-util)
 (require 'nnmail)
 
 (defvar gnus-registry-dirty t
@@ -170,6 +171,7 @@
 	      (standard-output (current-buffer)))
 	  (gnus-gnus-to-quick-newsrc-format t "gnus registry startup file" 'gnus-registry-alist)
 	  (gnus-registry-cache-whitespace file)
+	  (set-text-properties (point-min) (point-max) nil)
 	  (save-buffer))
       (let ((coding-system-for-write gnus-ding-file-coding-system)
 	    (version-control gnus-backup-startup-file)
@@ -242,7 +244,8 @@
 	(gnus-registry-clean-empty-function))
       ;; now trim the registry appropriately
       (setq gnus-registry-alist (gnus-registry-trim
-				 (hashtable-to-alist gnus-registry-hashtb)))
+				 (gnus-hashtable-to-alist
+				  gnus-registry-hashtb)))
       ;; really save
       (gnus-registry-cache-save)
       (setq gnus-registry-entry-caching caching)
@@ -287,7 +290,7 @@
 
 (defun gnus-registry-read ()
   (gnus-registry-cache-read)
-  (setq gnus-registry-hashtb (alist-to-hashtable gnus-registry-alist))
+  (setq gnus-registry-hashtb (gnus-alist-to-hashtable gnus-registry-alist))
   (setq gnus-registry-dirty nil))
 
 (defun gnus-registry-trim (alist)
@@ -316,26 +319,6 @@
 		      (or (cdr (gethash (car a) timehash)) '(0 0 0))
 		      (or (cdr (gethash (car b) timehash)) '(0 0 0))))))))))
 
-(defun alist-to-hashtable (alist)
-  "Build a hashtable from the values in ALIST."
-  (let ((ht (make-hash-table
-	     :size 4096
-	     :test 'equal)))
-    (mapc
-     (lambda (kv-pair)
-       (puthash (car kv-pair) (cdr kv-pair) ht))
-     alist)
-     ht))
-
-(defun hashtable-to-alist (hash)
-  "Build an alist from the values in HASH."
-  (let ((list nil))
-    (maphash
-     (lambda (key value)
-       (setq list (cons (cons key value) list)))
-     hash)
-    list))
-
 (defun gnus-registry-action (action data-header from &optional to method)
   (let* ((id (mail-header-id data-header))
 	 (subject (gnus-registry-simplify-subject
@@ -714,7 +697,7 @@
   "Clear the Gnus registry."
   (interactive)
   (setq gnus-registry-alist nil)
-  (setq gnus-registry-hashtb (alist-to-hashtable gnus-registry-alist))
+  (setq gnus-registry-hashtb (gnus-alist-to-hashtable gnus-registry-alist))
   (setq gnus-registry-dirty t))
 
 ;;;###autoload
Index: gnus/lisp/gnus-sieve.el
diff -u gnus/lisp/gnus-sieve.el:7.6 gnus/lisp/gnus-sieve.el:7.7
--- gnus/lisp/gnus-sieve.el:7.6	Wed Feb  8 05:17:15 2006
+++ gnus/lisp/gnus-sieve.el	Tue Apr 11 17:49:40 2006
@@ -107,7 +107,7 @@
   (find-file gnus-sieve-file)
   (goto-char (point-min))
   (if (re-search-forward (regexp-quote gnus-sieve-region-start) nil t)
-      (delete-region (match-end 0)
+      (delete-region (match-beginning 0)
 		     (or (re-search-forward (regexp-quote
 					     gnus-sieve-region-end) nil t)
 			 (point)))
Index: gnus/lisp/gnus-sum.el
diff -u gnus/lisp/gnus-sum.el:7.132 gnus/lisp/gnus-sum.el:7.142
--- gnus/lisp/gnus-sum.el:7.132	Tue Apr 11 07:24:19 2006
+++ gnus/lisp/gnus-sum.el	Wed Apr 26 17:32:25 2006
@@ -87,7 +87,7 @@
 		 number
 		 (sexp :menu-tag "other" t)))
 
-(defcustom gnus-refer-thread-limit 200
+(defcustom gnus-refer-thread-limit 500
   "*The number of old headers to fetch when doing \\<gnus-summary-mode-map>\\[gnus-summary-refer-thread].
 If t, fetch all the available old headers."
   :group 'gnus-thread
@@ -1712,6 +1712,8 @@
   "," gnus-summary-best-unread-article
   "\M-s" gnus-summary-search-article-forward
   "\M-r" gnus-summary-search-article-backward
+  "\M-S" gnus-summary-repeat-search-article-forward
+  "\M-R" gnus-summary-repeat-search-article-backward
   "<" gnus-summary-beginning-of-article
   ">" gnus-summary-end-of-article
   "j" gnus-summary-goto-article
@@ -1843,6 +1845,7 @@
 (gnus-define-keys (gnus-summary-limit-map "/" gnus-summary-mode-map)
   "/" gnus-summary-limit-to-subject
   "n" gnus-summary-limit-to-articles
+  "b" gnus-summary-limit-to-bodies
   "w" gnus-summary-pop-limit
   "s" gnus-summary-limit-to-subject
   "a" gnus-summary-limit-to-author
@@ -1889,6 +1892,7 @@
   "T" gnus-summary-toggle-threads
   "t" gnus-summary-rethread-current
   "^" gnus-summary-reparent-thread
+  "\M-^" gnus-summary-reparent-children
   "s" gnus-summary-show-thread
   "S" gnus-summary-show-all-threads
   "h" gnus-summary-hide-thread
@@ -2083,6 +2087,7 @@
   "O" gnus-article-save-part-and-strip
   "r" gnus-article-replace-part
   "d" gnus-article-delete-part
+  "t" gnus-article-view-part-as-type
   "j" gnus-article-jump-to-part
   "c" gnus-article-copy-part
   "C" gnus-article-view-part-as-charset
@@ -2230,6 +2235,7 @@
 	       ["Repair multipart" gnus-summary-repair-multipart t]
 	       ["Pipe part..." gnus-article-pipe-part t]
 	       ["Inline part" gnus-article-inline-part t]
+	       ["View part as type..." gnus-article-view-part-as-type t]
 	       ["Encrypt body" gnus-article-encrypt-body
 		:active (not (gnus-group-read-only-p))
 	       ,@(if (featurep 'xemacs) nil
@@ -8000,6 +8006,38 @@
 	   gnus-duplicate-mark gnus-souped-mark)
      'reverse)))
 
+(defun gnus-summary-limit-to-bodies (match &optional reverse)
+  "Limit the summary buffer to articles that have bodies that match MATCH.
+If REVERSE (the prefix), limit to articles that don't match."
+  (interactive "sMatch body (regexp): \nP")
+  (let ((articles nil)
+	(gnus-select-article-hook nil)	;Disable hook.
+	(gnus-article-prepare-hook nil)
+	(gnus-use-article-prefetch nil)
+	(gnus-keep-backlog nil)
+	(gnus-break-pages nil)
+	(gnus-summary-display-arrow nil)
+	(gnus-updated-mode-lines nil)
+	(gnus-auto-center-summary nil)
+	(gnus-display-mime-function nil))
+    (dolist (data gnus-newsgroup-data)
+      (let (gnus-mark-article-hook)
+	(gnus-summary-select-article t t nil (gnus-data-number data)))
+      (save-excursion
+	(set-buffer gnus-article-buffer)
+	(article-goto-body)
+	(let* ((case-fold-search t)
+	       (found (re-search-forward match nil t)))
+	  (when (or (and found
+			 (not reverse))
+		    (and (not found)
+			 reverse))
+	    (push (gnus-data-number data) articles)))))
+    (if (not articles)
+	(message "No messages matched")
+      (gnus-summary-limit articles)))
+  (gnus-summary-position-point))
+
 (defun gnus-summary-limit-to-replied (&optional unreplied)
   "Limit the summary buffer to replied articles.
 If UNREPLIED (the prefix), limit to unreplied articles."
@@ -8684,6 +8722,20 @@
       (widen)
       (isearch-forward regexp-p))))
 
+(defun gnus-summary-repeat-search-article-forward ()
+  "Repeat the previous search forwards."
+  (interactive)
+  (unless gnus-last-search-regexp
+    (error "No previous search"))
+  (gnus-summary-search-article-forward gnus-last-search-regexp))
+
+(defun gnus-summary-repeat-search-article-backward ()
+  "Repeat the previous search backwards."
+  (interactive)
+  (unless gnus-last-search-regexp
+    (error "No previous search"))
+  (gnus-summary-search-article-forward gnus-last-search-regexp t))
+
 (defun gnus-summary-search-article-forward (regexp &optional backward)
   "Search for an article containing REGEXP forward.
 If BACKWARD, search backward instead."
@@ -9151,10 +9203,6 @@
 	      (replace-match (idna-to-unicode (match-string 1))))
 	    (set-window-start (get-buffer-window (current-buffer)) start)))))))
 
-(autoload 'unmorse-region "morse"
-  "Convert morse coded text in region to ordinary ASCII text."
-  t)
-
 (defun gnus-summary-morse-message (&optional arg)
   "Morse decode the current article."
   (interactive "P")
@@ -9678,7 +9726,7 @@
   (interactive)
   (or gnus-expert-user
       (gnus-yes-or-no-p
-       "Are you really, really, really sure you want to delete all these messages? ")
+       "Are you really, really sure you want to delete all expirable messages? ")
       (error "Phew!"))
   (gnus-summary-expire-articles t))
 
@@ -10822,41 +10870,51 @@
     (error "The current newsgroup does not support article editing"))
   (unless (<= (length gnus-newsgroup-processable) 1)
     (error "No more than one article may be marked"))
-  (save-window-excursion
-    (let ((gnus-article-buffer " *reparent*")
-	  (current-article (gnus-summary-article-number))
-	  ;; First grab the marked article, otherwise one line up.
-	  (parent-article (if (not (null gnus-newsgroup-processable))
-			      (car gnus-newsgroup-processable)
-			    (save-excursion
-			      (if (eq (forward-line -1) 0)
-				  (gnus-summary-article-number)
-				(error "Beginning of summary buffer"))))))
-      (unless (not (eq current-article parent-article))
-	(error "An article may not be self-referential"))
-      (let ((message-id (mail-header-id
-			 (gnus-summary-article-header parent-article))))
-	(unless (and message-id (not (equal message-id "")))
-	  (error "No message-id in desired parent"))
-	(gnus-with-article current-article
-	  (save-restriction
-	    (goto-char (point-min))
-	    (message-narrow-to-head)
-	    (if (re-search-forward "^References: " nil t)
-		(progn
-		  (re-search-forward "^[^ \t]" nil t)
-		  (forward-line -1)
-		  (end-of-line)
-		  (insert " " message-id))
-	      (insert "References: " message-id "\n"))))
-	(set-buffer gnus-summary-buffer)
-	(gnus-summary-unmark-all-processable)
-	(gnus-summary-update-article current-article)
-	(if (gnus-summary-goto-subject (cdr gnus-article-current) nil t)
+  (let ((child (gnus-summary-article-number))
+	;; First grab the marked article, otherwise one line up.
+	(parent (if (not (null gnus-newsgroup-processable))
+		    (car gnus-newsgroup-processable)
+		  (save-excursion
+		    (if (eq (forward-line -1) 0)
+			(gnus-summary-article-number)
+		      (error "Beginning of summary buffer"))))))
+    (gnus-summary-reparent-children parent (list child))))
+
+(defun gnus-summary-reparent-children (parent children)
+  "Make PARENT the parent of CHILDREN.
+When called interactively, PARENT is is current article and
+CHILDREN are the process-marked articles."
+  (interactive
+   (list (gnus-summary-article-number)
+	 (gnus-summary-work-articles nil)))
+  (dolist (child children)
+    (save-window-excursion
+      (let ((gnus-article-buffer " *reparent*"))
+	(unless (not (eq parent child))
+	  (error "An article may not be self-referential"))
+	(let ((message-id (mail-header-id
+			   (gnus-summary-article-header parent))))
+	  (unless (and message-id (not (equal message-id "")))
+	    (error "No message-id in desired parent"))
+	  (gnus-with-article child
+	    (save-restriction
+	      (goto-char (point-min))
+	      (message-narrow-to-head)
+	      (if (re-search-forward "^References: " nil t)
+		  (progn
+		    (re-search-forward "^[^ \t]" nil t)
+		    (forward-line -1)
+		    (end-of-line)
+		    (insert " " message-id))
+		(insert "References: " message-id "\n"))))
+	  (set-buffer gnus-summary-buffer)
+	  (gnus-summary-unmark-all-processable)
+	  (gnus-summary-update-article child)
+	  (when (gnus-summary-goto-subject (cdr gnus-article-current) nil t)
 	    (gnus-summary-update-secondary-mark (cdr gnus-article-current)))
-	(gnus-summary-rethread-current)
-	(gnus-message 3 "Article %d is now the child of article %d"
-		      current-article parent-article)))))
+	  (gnus-summary-rethread-current)
+	  (gnus-message 3 "Article %d is now the child of article %d"
+			child parent))))))
 
 (defun gnus-summary-toggle-threads (&optional arg)
   "Toggle showing conversation threads.
@@ -11403,6 +11461,8 @@
 	  (error "No such group: %s" to-newsgroup)))
     to-newsgroup))
 
+(defvar gnus-summary-save-parts-counter)
+
 (defun gnus-summary-save-parts (type dir n &optional reverse)
   "Save parts matching TYPE to DIR.
 If REVERSE, save parts that do not match TYPE."
@@ -11425,7 +11485,8 @@
       (let ((handles (or gnus-article-mime-handles
 			 (mm-dissect-buffer nil gnus-article-loose-mime)
 			 (and gnus-article-emulate-mime
-			      (mm-uu-dissect)))))
+			      (mm-uu-dissect))))
+	    (gnus-summary-save-parts-counter 1))
 	(when handles
 	  (gnus-summary-save-parts-1 type dir handles reverse)
 	  (unless gnus-article-mime-handles ;; Don't destroy this case.
@@ -11447,10 +11508,11 @@
 		       (mm-handle-disposition handle) 'filename)
 		      (mail-content-type-get
 		       (mm-handle-type handle) 'name)
-		      (concat gnus-newsgroup-name
-			      "." (number-to-string
-				   (cdr gnus-article-current))))))
+		      (format "%s.%d.%d" gnus-newsgroup-name
+			      (cdr gnus-article-current)
+			      gnus-summary-save-parts-counter))))
 		   dir)))
+	(incf gnus-summary-save-parts-counter)
 	(unless (file-exists-p file)
 	  (mm-save-part-to-file handle file))))))
 
@@ -11605,11 +11667,14 @@
 	    ()				; Malformed head.
 	  (unless (gnus-summary-article-sparse-p (mail-header-number header))
 	    (when (and (stringp id)
-		       (not (string= (gnus-group-real-name group)
-				     (car where))))
-	      ;; If we fetched by Message-ID and the article came
-	      ;; from a different group, we fudge some bogus article
-	      ;; numbers for this article.
+		       (or
+			(not (string= (gnus-group-real-name group)
+				      (car where)))
+			(not (gnus-server-equal gnus-override-method
+						(gnus-group-method group)))))
+	      ;; If we fetched by Message-ID and the article came from
+	      ;; a different group (or server), we fudge some bogus
+	      ;; article numbers for this article.
 	      (mail-header-set-number header gnus-reffed-article-number))
 	    (save-excursion
 	      (set-buffer gnus-summary-buffer)
Index: gnus/lisp/gnus-topic.el
diff -u gnus/lisp/gnus-topic.el:7.15 gnus/lisp/gnus-topic.el:7.16
--- gnus/lisp/gnus-topic.el:7.15	Wed Mar  8 15:41:02 2006
+++ gnus/lisp/gnus-topic.el	Sun Apr 16 18:41:49 2006
@@ -726,6 +726,9 @@
 	       (not (gnus-topic-goto-missing-topic (caadr parent))))
       (gnus-topic-display-missing-topic (caadr parent))))
   (gnus-topic-goto-missing-topic topic)
+  ;; Skip past all groups in the topic we're in.
+  (while (gnus-group-group-name)
+    (forward-line 1))
   (let* ((top (gnus-topic-find-topology topic))
 	 (children (cddr top))
 	 (type (cadr top))
Index: gnus/lisp/gnus-util.el
diff -u gnus/lisp/gnus-util.el:7.40 gnus/lisp/gnus-util.el:7.48
--- gnus/lisp/gnus-util.el:7.40	Fri Mar 17 11:43:26 2006
+++ gnus/lisp/gnus-util.el	Sat Apr 22 02:51:38 2006
@@ -60,8 +60,11 @@
 
 (eval-and-compile
   (cond
-   ((fboundp 'replace-in-string)
-    (defalias 'gnus-replace-in-string 'replace-in-string))
+   ;; Prefer `replace-regexp-in-string' (present in Emacs, XEmacs 21.5,
+   ;; SXEmacs 22.1.4) over `replace-in-string'.  The later leads to inf-loops
+   ;; on empty matches:
+   ;;   (replace-in-string "foo" "/*$" "/")
+   ;;   (replace-in-string "xe" "\\(x\\)?" "")
    ((fboundp 'replace-regexp-in-string)
     (defun gnus-replace-in-string  (string regexp newtext &optional literal)
       "Replace all matches for REGEXP with NEWTEXT in STRING.
@@ -69,7 +72,9 @@
 string containing the replacements.
 
 This is a compatibility function for different Emacsen."
-      (replace-regexp-in-string regexp newtext string nil literal)))))
+      (replace-regexp-in-string regexp newtext string nil literal)))
+   ((fboundp 'replace-in-string)
+    (defalias 'gnus-replace-in-string 'replace-in-string))))
 
 (defun gnus-boundp (variable)
   "Return non-nil if VARIABLE is bound and non-nil."
@@ -723,6 +728,28 @@
       (unless dir
 	(delete-directory directory)))))
 
+;; The following two functions are used in gnus-registry.
+;; They were contributed by Andreas Fuchs <[email protected]>.
+(defun gnus-alist-to-hashtable (alist)
+  "Build a hashtable from the values in ALIST."
+  (let ((ht (make-hash-table
+	     :size 4096
+	     :test 'equal)))
+    (mapc
+     (lambda (kv-pair)
+       (puthash (car kv-pair) (cdr kv-pair) ht))
+     alist)
+     ht))
+
+(defun gnus-hashtable-to-alist (hash)
+  "Build an alist from the values in HASH."
+  (let ((list nil))
+    (maphash
+     (lambda (key value)
+       (setq list (cons (cons key value) list)))
+     hash)
+    list))
+
 (defun gnus-strip-whitespace (string)
   "Return STRING stripped of all whitespace."
   (while (string-match "[\r\n\t ]+" string)
@@ -1194,6 +1221,12 @@
   :version "22.1"
   :group 'gnus-various)
 
+(defun kill-empty-logs ()
+  (dolist (buf (list (get-buffer "*Compile-Log*")
+		     (get-buffer "*Compile-Log-Show*")))
+    (if (and buf (= (buffer-size buf) 0))
+	(kill-buffer buf))))
+
 (defun gnus-byte-compile (form)
   "Byte-compile FORM if `gnus-use-byte-compile' is non-nil."
   (if gnus-use-byte-compile
@@ -1206,7 +1239,9 @@
 	(defalias 'gnus-byte-compile
 	  (lambda (form)
 	    (let ((byte-compile-warnings '(unresolved callargs redefine)))
-	      (byte-compile form))))
+	      (prog1
+		  (byte-compile form)
+		(kill-empty-logs)))))
 	(gnus-byte-compile form))
     form))
 
@@ -1397,20 +1432,19 @@
 (defun gnus-select-frame-set-input-focus (frame)
   "Select FRAME, raise it, and set input focus, if possible."
   (cond ((featurep 'xemacs)
-	 (raise-frame frame)
-	 (select-frame frame)
-	 (focus-frame frame))
-	;; The function `select-frame-set-input-focus' won't set
-	;; the input focus under Emacs 21.2 and X window system.
-	;;((fboundp 'select-frame-set-input-focus)
-	;; (defalias 'gnus-select-frame-set-input-focus
-	;;   'select-frame-set-input-focus)
-	;; (select-frame-set-input-focus frame))
+	 (if (fboundp 'select-frame-set-input-focus)
+	     (select-frame-set-input-focus frame)
+	   (raise-frame frame)
+	   (select-frame frame)
+	   (focus-frame frame)))
+	;; `select-frame-set-input-focus' defined in Emacs 21 will not
+	;; set the input focus.
+	((>= emacs-major-version 22)
+	 (select-frame-set-input-focus frame))
 	(t
 	 (raise-frame frame)
 	 (select-frame frame)
-	 (cond ((and (eq window-system 'x)
-		     (fboundp 'x-focus-frame))
+	 (cond ((memq window-system '(x mac))
 		(x-focus-frame frame))
 	       ((eq window-system 'w32)
 		(w32-focus-frame frame)))
Index: gnus/lisp/gnus-uu.el
diff -u gnus/lisp/gnus-uu.el:7.24 gnus/lisp/gnus-uu.el:7.25
--- gnus/lisp/gnus-uu.el:7.24	Wed Feb  8 05:17:15 2006
+++ gnus/lisp/gnus-uu.el	Wed Apr 12 04:00:49 2006
@@ -853,7 +853,9 @@
 		       "Date: %s\nFrom: %s\nSubject: %s Digest\n\n"
 		       (message-make-date) name name))
 	      (when (and message-forward-as-mime gnus-uu-digest-buffer)
-		(insert "<#part type=message/rfc822>\nSubject: Topics\n\n"))
+		(insert
+		 "<#mml type=message/rfc822>\nSubject: Topics\n\n<#/mml>\n")
+		(forward-line -1))
 	      (insert "Topics:\n")))
 	(when (not (eq in-state 'end))
 	  (setq state (list 'middle))))
Index: gnus/lisp/gnus-xmas.el
diff -u gnus/lisp/gnus-xmas.el:7.17 gnus/lisp/gnus-xmas.el:7.18
--- gnus/lisp/gnus-xmas.el:7.17	Tue Jan 24 12:36:15 2006
+++ gnus/lisp/gnus-xmas.el	Sun Apr 30 11:44:06 2006
@@ -39,7 +39,6 @@
 (defvar menu-bar-mode (featurep 'menubar))
 (require 'messagexmas)
 (require 'wid-edit)
-(require 'timer-funcs)
 
 (defgroup gnus-xmas nil
   "XEmacsoid support for Gnus"
Index: gnus/lisp/gnus.el
diff -u gnus/lisp/gnus.el:7.52 gnus/lisp/gnus.el:7.54
--- gnus/lisp/gnus.el:7.52	Fri Mar 10 10:48:31 2006
+++ gnus/lisp/gnus.el	Mon May  1 17:14:44 2006
@@ -293,7 +293,7 @@
   :link '(custom-manual "(gnus)Exiting Gnus")
   :group 'gnus)
 
-(defconst gnus-version-number "0.4"
+(defconst gnus-version-number "0.6"
   "Version number for this version of Gnus.")
 
 (defconst gnus-version (format "No Gnus v%s" gnus-version-number)
Index: gnus/lisp/hashcash.el
diff -u gnus/lisp/hashcash.el:7.15 gnus/lisp/hashcash.el:7.18
--- gnus/lisp/hashcash.el:7.15	Mon Mar 27 11:39:48 2006
+++ gnus/lisp/hashcash.el	Sat Apr 15 20:12:07 2006
@@ -223,9 +223,6 @@
     (let ((pay (hashcash-generate-payment (hashcash-payment-to arg)
 					  (hashcash-payment-required arg))))
       (when pay
-	;;      (insert-before-markers "X-Payment: hashcash "
-	;;			     (number-to-string (hashcash-version pay)) " "
-	;;			     pay "\n")
 	(insert-before-markers "X-Hashcash: " pay "\n")))))
 
 ;;;###autoload
@@ -234,26 +231,23 @@
 Only start calculation.  Results are inserted when ready."
   (interactive "sPay to: ")
   (unless (hashcash-already-paid-p arg)
-    (hashcash-generate-payment-async (hashcash-payment-to arg)
-				     (hashcash-payment-required arg)
-				     `(lambda (process payment)
-					(hashcash-insert-payment-async-2 ,(current-buffer) process payment)))))
+    (hashcash-generate-payment-async
+     (hashcash-payment-to arg)
+     (hashcash-payment-required arg)
+     `(lambda (process payment)
+	(hashcash-insert-payment-async-2 ,(current-buffer) process payment)))))
 
 (defun hashcash-insert-payment-async-2 (buffer process pay)
-  (with-current-buffer buffer
-    (save-excursion
-      (save-restriction
-	(setq hashcash-process-alist (delq
-				      (assq process hashcash-process-alist)
-				      hashcash-process-alist))
-	(goto-char (point-min))
-	(search-forward mail-header-separator)
-	(beginning-of-line)
-	(when pay
-;;      (insert-before-markers "X-Payment: hashcash "
-;;			     (number-to-string (hashcash-version pay)) " "
-;;			     pay "\n")
-	  (insert-before-markers "X-Hashcash: " pay))))))
+  (when (buffer-live-p buffer)
+    (with-current-buffer buffer
+      (save-excursion
+	(save-restriction
+	  (setq hashcash-process-alist (delq
+					(assq process hashcash-process-alist)
+					hashcash-process-alist))
+	  (message-goto-eoh)
+	  (when pay
+	    (insert-before-markers "X-Hashcash: " pay)))))))
 
 (defun hashcash-cancel-async (&optional buffer)
   "Delete any hashcash processes associated with BUFFER.
@@ -318,10 +312,7 @@
 	(addrlist nil))
     (save-excursion
       (save-restriction
-	(goto-char (point-min))
-	(search-forward mail-header-separator)
-	(beginning-of-line)
-	(narrow-to-region (point-min) (point))
+	(message-narrow-to-headers)
 	(let ((to (hashcash-strip-quoted-names (mail-fetch-field "To" nil t)))
 	      (cc (hashcash-strip-quoted-names (mail-fetch-field "Cc" nil t)))
 	      (ng (hashcash-strip-quoted-names (mail-fetch-field "Newsgroups"
Index: gnus/lisp/ietf-drums.el
diff -u gnus/lisp/ietf-drums.el:7.9 gnus/lisp/ietf-drums.el:7.11
--- gnus/lisp/ietf-drums.el:7.9	Wed Feb  8 05:17:15 2006
+++ gnus/lisp/ietf-drums.el	Mon Apr 17 13:08:55 2006
@@ -200,7 +200,9 @@
 		  (buffer-substring
 		   (1+ (point))
 		   (progn (forward-sexp 1) (1- (point))))))))
-	 (t (error "Unknown symbol: %c" c))))
+	 (t
+	  (message "Unknown symbol: %c" c)
+	  (forward-char 1))))
       ;; If we found no display-name, then we look for comments.
       (if display-name
 	  (setq display-string
@@ -213,8 +215,10 @@
 	     (ietf-drums-get-comment string)))
 	(cons mailbox display-string)))))
 
-(defun ietf-drums-parse-addresses (string)
-  "Parse STRING and return a list of MAILBOX / DISPLAY-NAME pairs."
+(defun ietf-drums-parse-addresses (string &optional rawp)
+  "Parse STRING and return a list of MAILBOX / DISPLAY-NAME pairs.
+If RAWP, don't actually parse the addresses, but instead return
+a list of address strings."
   (if (null string)
       nil
     (with-temp-buffer
@@ -231,20 +235,24 @@
 	       (skip-chars-forward "^,"))))
 	   ((eq c ?,)
 	    (setq address
-		  (condition-case nil
-		      (ietf-drums-parse-address
-		       (buffer-substring beg (point)))
-		    (error nil)))
+		  (if rawp
+		      (buffer-substring beg (point))
+		    (condition-case nil
+			(ietf-drums-parse-address
+			 (buffer-substring beg (point)))
+		      (error nil))))
 	    (if address (push address pairs))
 	    (forward-char 1)
 	    (setq beg (point)))
 	   (t
 	    (forward-char 1))))
 	(setq address
-	      (condition-case nil
-		  (ietf-drums-parse-address
-		   (buffer-substring beg (point)))
-		(error nil)))
+	      (if rawp
+		  (buffer-substring beg (point))
+		(condition-case nil
+		    (ietf-drums-parse-address
+		     (buffer-substring beg (point)))
+		  (error nil))))
 	(if address (push address pairs))
 	(nreverse pairs)))))
 
Index: gnus/lisp/imap.el
diff -u gnus/lisp/imap.el:7.27 gnus/lisp/imap.el:7.28
--- gnus/lisp/imap.el:7.27	Fri Jan 20 09:35:06 2006
+++ gnus/lisp/imap.el	Mon Apr 17 18:04:54 2006
@@ -912,14 +912,27 @@
   (and (not (imap-capability 'LOGINDISABLED buffer))
        (not (imap-capability 'X-LOGIN-CMD-DISABLED buffer))))
 
+(defun imap-quote-specials (string)
+  (with-temp-buffer
+    (insert string)
+    (goto-char (point-min))
+    (while (re-search-forward "[\\\"]" nil t)
+      (forward-char -1)
+      (insert "\\")
+      (forward-char 1))
+    (buffer-string)))
+
 (defun imap-login-auth (buffer)
   "Login to server using the LOGIN command."
   (message "imap: Plaintext authentication...")
   (imap-interactive-login buffer
 			  (lambda (user passwd)
 			    (imap-ok-p (imap-send-command-wait
-					(concat "LOGIN \"" user "\" \""
-						passwd "\""))))))
+					(concat "LOGIN \""
+						(imap-quote-specials user)
+						"\" \""
+						(imap-quote-specials passwd)
+						"\""))))))
 
 (defun imap-anonymous-p (buffer)
   t)
Index: gnus/lisp/lpath.el
diff -u gnus/lisp/lpath.el:7.17 gnus/lisp/lpath.el:7.20
--- gnus/lisp/lpath.el:7.17	Wed Mar  1 02:56:29 2006
+++ gnus/lisp/lpath.el	Thu Apr 27 18:08:50 2006
@@ -35,10 +35,11 @@
 		     find-coding-systems-region find-coding-systems-string
 		     mail-abbrevs-setup mouse-minibuffer-check mouse-movement-p
 		     mouse-scroll-subr overlay-lists posn-point posn-window
-		     read-event set-buffer-multibyte track-mouse window-edges))
+		     read-event set-buffer-multibyte
+		     select-frame-set-input-focus track-mouse window-edges))
       (maybe-bind '(adaptive-fill-first-line-regexp
 		    buffer-display-table buffer-file-coding-system
-		    current-language-environment
+		    current-language-environment cursor-in-non-selected-windows
 		    default-enable-multibyte-characters
 		    enable-multibyte-characters gnus-agent-expire-current-dirs
 		    language-info-alist mark-active mouse-selection-click-count
Index: gnus/lisp/mail-source.el
diff -u gnus/lisp/mail-source.el:7.15 gnus/lisp/mail-source.el:7.17
--- gnus/lisp/mail-source.el:7.15	Wed Feb  8 05:17:15 2006
+++ gnus/lisp/mail-source.el	Sun Apr 30 11:44:06 2006
@@ -678,12 +678,20 @@
     (sleep-for delay)))
 
 (defun mail-source-call-script (script)
-  (let ((background nil))
+  (let ((background nil)
+	(stderr (get-buffer-create " *mail-source-stderr*"))
+	result)
     (when (string-match "& *$" script)
       (setq script (substring script 0 (match-beginning 0))
 	    background 0))
-    (call-process shell-file-name nil background nil
-		  shell-command-switch script)))
+    (setq result
+	  (call-process shell-file-name nil background nil
+			shell-command-switch script))
+    (when (and result
+	       (not (zerop result)))
+      (set-buffer stderr)
+      (message "Mail source error: %s" (buffer-string)))
+    (kill-buffer stderr)))
 
 ;;;
 ;;; Different fetchers
@@ -877,11 +885,6 @@
 (defvar mail-source-report-new-mail nil)
 (defvar mail-source-report-new-mail-timer nil)
 (defvar mail-source-report-new-mail-idle-timer nil)
-
-(eval-when-compile
-  (if (featurep 'xemacs)
-      (require 'timer-funcs)
-    (require 'timer)))
 
 (defun mail-source-start-idle-timer ()
   ;; Start our idle timer if necessary, so we delay the check until the
Index: gnus/lisp/message.el
diff -u gnus/lisp/message.el:7.139 gnus/lisp/message.el:7.170
--- gnus/lisp/message.el:7.139	Tue Apr 11 08:11:24 2006
+++ gnus/lisp/message.el	Sun Apr 30 12:26:47 2006
@@ -34,12 +34,12 @@
 (eval-when-compile
   (require 'cl)
   (defvar gnus-message-group-art)
-  (defvar gnus-list-identifiers) ; gnus-sum is required where necessary
-  (require 'hashcash))
+  (defvar gnus-list-identifiers)) ; gnus-sum is required where necessary
+(require 'hashcash)
 (require 'canlock)
 (require 'mailheader)
-(require 'nnheader)
 (require 'gmm-utils)
+(require 'nnheader)
 ;; This is apparently necessary even though things are autoloaded.
 ;; Because we dynamically bind mail-abbrev-mode-regexp, we'd better
 ;; require mailabbrev here.
@@ -49,6 +49,7 @@
 (require 'mail-parse)
 (require 'mml)
 (require 'rfc822)
+(require 'ecomplete)
 
 (defgroup message '((user-mail-address custom-variable)
 		    (user-full-name custom-variable))
@@ -470,7 +471,14 @@
 		 (const :tag "consult file" t)))
 
 ;;;###autoload
-(defcustom message-user-organization-file "/usr/lib/news/organization"
+(defcustom message-user-organization-file
+  (let (orgfile)
+    (dolist (f (list "/etc/organization"
+		     "/etc/news/organization"
+		     "/usr/lib/news/organization"))
+      (when (file-readable-p f)
+	(setq orgfile f)))
+    orgfile)
   "*Local news organization file."
   :type 'file
   :link '(custom-manual "(message)News Headers")
@@ -867,14 +875,48 @@
 (defcustom message-citation-line-function 'message-insert-citation-line
   "*Function called to insert the \"Whomever writes:\" line.
 
+Predefined functions include `message-insert-citation-line' and
+`message-insert-formated-citation-line' (see the variable
+`message-citation-line-format').
+
 Note that Gnus provides a feature where the reader can click on
 `writes:' to hide the cited text.  If you change this line too much,
 people who read your message will have to change their Gnus
 configuration.  See the variable `gnus-cite-attribution-suffix'."
-  :type 'function
+  :type '(choice
+	  (function-item :tag "plain" message-insert-citation-line)
+	  (function-item :tag "formatted" message-insert-formated-citation-line)
+	  (function :tag "Other"))
   :link '(custom-manual "(message)Insertion Variables")
   :group 'message-insertion)
 
+(defcustom message-citation-line-format "On %a, %b %d %Y, %n wrote:"
+  "Format of the \"Whomever writes:\" line.
+
+The string is formatted using `format-spec'.  The following
+constructs are replaced:
+
+  %f   The full From, e.g. \"John Doe <[email protected]>\".
+  %n   The mail address, e.g. \"[email protected]\".
+  %N   The real name if present, e.g.: \"John Doe\", else fall
+       back to the mail address.
+  %F   The first name if present, e.g.: \"John\".
+  %L   The last name if present, e.g.: \"Doe\".
+
+All other format specifiers are passed to `format-time-string'
+which is called using the date from the article your replying to.
+Extracting the first (%F) and last name (%L) is done
+heuristically, so you should always check it yourself.
+
+Please also read the note in the documentation of
+`message-citation-line-function'."
+  :type '(choice (const :tag "Plain" "%f writes:")
+		 (const :tag "Include date" "On %a, %b %d %Y, %n wrote:")
+		 string)
+  :link '(custom-manual "(message)Insertion Variables")
+  :version "23.0" ;; No Gnus
+  :group 'message-insertion)
+
 ;;;###autoload
 (defcustom message-yank-prefix "> "
   "*Prefix inserted on the lines of yanked messages.
@@ -1080,13 +1122,25 @@
 
 (defcustom message-mail-alias-type 'abbrev
   "*What alias expansion type to use in Message buffers.
-The default is `abbrev', which uses mailabbrev.  nil switches
-mail aliases off."
+The default is `abbrev', which uses mailabbrev.  `ecomplete' uses
+an electric completion mode.  nil switches mail aliases off.
+This can also be a list of values."
   :group 'message
   :link '(custom-manual "(message)Mail Aliases")
   :type '(choice (const :tag "Use Mailabbrev" abbrev)
+		 (const :tag "Use ecomplete" ecomplete)
 		 (const :tag "No expansion" nil)))
 
+(defcustom message-self-insert-commands '(self-insert-command)
+  "List of `self-insert-command's used to trigger ecomplete.
+When one of those commands is invoked to enter a character in To or Cc
+header, ecomplete will suggest the candidates of recipients (see also
+`message-mail-alias-type').  If you use some tool to enter non-ASCII
+text and it replaces `self-insert-command' with the other command, e.g.
+`egg-self-insert-command', you may want to add it to this list."
+  :group 'message-various
+  :type '(repeat function))
+
 (defcustom message-auto-save-directory
   (file-name-as-directory (nnheader-concat message-directory "drafts"))
   "*Directory where Message auto-saves buffers if Gnus isn't running.
@@ -1130,7 +1184,8 @@
   (or (not (listp message-shoot-gnksa-feet))
       (memq feature message-shoot-gnksa-feet)))
 
-(defcustom message-hidden-headers "^References:"
+(defcustom message-hidden-headers '("^References:" "^Face:" "^X-Face:"
+				    "^X-Draft-From:")
   "Regexp of headers to be hidden when composing new messages.
 This can also be a list of regexps to match headers.  Or a list
 starting with `not' and followed by regexps."
@@ -1511,7 +1566,7 @@
 		 (const :tag "Never" nil)
 		 (const :tag "Always" t)))
 
-(defcustom message-generate-hashcash nil
+(defcustom message-generate-hashcash (if (executable-find "hashcash") t)
   "*Whether to generate X-Hashcash: headers.
 You must have the \"hashcash\" binary installed, see `hashcash-path'."
   :group 'message-headers
@@ -1637,11 +1692,16 @@
 (defcustom message-valid-fqdn-regexp
   (concat "[a-z0-9][-.a-z0-9]+\\." ;; [hostname.subdomain.]domain.
 	  ;; valid TLDs:
-	  "\\([a-z][a-z]" ;; two letter country TDLs
-	  "\\|biz\\|com\\|edu\\|gov\\|int\\|mil\\|net\\|org"
-	  "\\|aero\\|coop\\|info\\|name\\|museum"
-	  "\\|arpa\\|pro\\|uucp\\|bitnet\\|bofh" ;; old style?
-	  "\\)")
+	  "\\([a-z][a-z]\\|" ;; two letter country TDLs
+	  "aero\\|arpa\\|bitnet\\|biz\\|bofh\\|"
+	  "cat\\|com\\|coop\\|edu\\|gov\\|"
+	  "info\\|int\\|jobs\\|"
+	  "mil\\|mobi\\|museum\\|name\\|net\\|"
+	  "org\\|pro\\|travel\\|uucp\\)")
+  ;; http://en.wikipedia.org/wiki/List_of_Internet_top-level_domains
+  ;; http://en.wikipedia.org/wiki/GTLD
+  ;; `in the process of being approved': .asia .post .tel .sex
+  ;; "dead" nato bitnet uucp
   "Regular expression that matches a valid FQDN."
   ;; see also: gnus-button-valid-fqdn-regexp
   :version "22.1"
@@ -2347,7 +2407,9 @@
 
   (define-key message-mode-map "\C-a" 'message-beginning-of-line)
   (define-key message-mode-map "\t" 'message-tab)
-  (define-key message-mode-map "\M-;" 'comment-region))
+  (define-key message-mode-map "\M-;" 'comment-region)
+
+  (define-key message-mode-map "\M-n" 'message-display-abbrev))
 
 (easy-menu-define
   message-mode-menu message-mode-map "Message Menu."
@@ -2509,10 +2571,18 @@
 		(get-text-property pos 'egg-lang)
 		(get-text-property pos 'egg-start)))))
 
+(defsubst message-mail-alias-type-p (type)
+  (if (atom message-mail-alias-type)
+      (eq message-mail-alias-type type)
+    (memq type message-mail-alias-type)))
+
 (defun message-strip-forbidden-properties (begin end &optional old-length)
   "Strip forbidden properties between BEGIN and END, ignoring the third arg.
 This function is intended to be called from `after-change-functions'.
 See also `message-forbidden-properties'."
+  (when (and (message-mail-alias-type-p 'ecomplete)
+	     (memq this-command message-self-insert-commands))
+    (message-display-abbrev))
   (when (and message-strip-special-text-properties
 	     (message-tamago-not-in-use-p begin))
     (let ((buffer-read-only nil)
@@ -2602,11 +2672,14 @@
   (add-hook 'after-change-functions 'message-strip-forbidden-properties
 	    nil 'local)
   ;; Allow mail alias things.
-  (when (eq message-mail-alias-type 'abbrev)
+  (cond
+   ((message-mail-alias-type-p 'abbrev)
     (if (fboundp 'mail-abbrevs-setup)
 	(mail-abbrevs-setup)
       (if (fboundp 'mail-aliases-setup)	; warning avoidance
 	  (mail-aliases-setup))))
+   ((message-mail-alias-type-p 'ecomplete)
+    (ecomplete-setup)))
   (unless buffer-file-name
     (message-set-auto-save-file-name))
   (unless (buffer-base-buffer)
@@ -2743,17 +2816,17 @@
   (or (search-forward (concat "\n" mail-header-separator "\n") nil t)
       (search-forward-regexp "[^:]+:\\([^\n]\\|\n[ \t]\\)+\n\n" nil t)))
 
+(defun message-in-body-p ()
+  "Return t if point is in the message body."
+  (let ((body (save-excursion (message-goto-body) (point))))
+    (>= (point) body)))
+
 (defun message-goto-eoh ()
   "Move point to the end of the headers."
   (interactive)
   (message-goto-body)
   (forward-line -1))
 
-(defun message-in-body-p ()
-  "Return t if point is in the message body."
-  (let ((body (save-excursion (message-goto-body) (point))))
-    (>= (point) body)))
-
 (defun message-goto-signature ()
   "Move point to the beginning of the message signature.
 If there is no signature in the article, go to the end and
@@ -3031,15 +3104,11 @@
       (message-newline-and-reformat arg t))
     t))
 
-;; Is it better to use `mail-header-end'?
 (defun message-point-in-header-p ()
   "Return t if point is in the header."
   (save-excursion
-    (let ((p (point)))
-      (goto-char (point-min))
-      (not (re-search-forward
-	    (concat "^" (regexp-quote mail-header-separator) "\n")
-	    p t)))))
+    (not (re-search-backward
+	  (concat "^" (regexp-quote mail-header-separator) "\n") nil t))))
 
 (defun message-do-auto-fill ()
   "Like `do-auto-fill', but don't fill in message header."
@@ -3404,6 +3473,93 @@
   "Cite function in the standard Message manner."
   (message-cite-original-1 nil))
 
+(defun message-insert-formated-citation-line (&optional from date)
+  "Function that inserts a formated citation line.
+
+See `message-citation-line-format'."
+  ;; The optional args are for testing/debugging.  They will disappear later.
+  ;; Example:
+  ;; (with-temp-buffer
+  ;;   (message-insert-formated-citation-line
+  ;;    "John Doe <[email protected]>"
+  ;;    (current-time))
+  ;;   (buffer-string))
+  (when (or message-reply-headers (and from date))
+    (unless from
+      (setq from (mail-header-from message-reply-headers)))
+    (let* ((data (condition-case ()
+		     (funcall (if (boundp gnus-extract-address-components)
+				  gnus-extract-address-components
+				'mail-extract-address-components)
+			      from)
+		   (error nil)))
+	   (name (car data))
+	   (fname name)
+	   (lname name)
+	   (net (car (cdr data)))
+	   (name-or-net (or (car data)
+			    (car (cdr data)) from))
+	   (replydate
+	    (or
+	     date
+	     ;; We need Gnus functionality if the user wants date or time from
+	     ;; the original article:
+	     (when (string-match "%[^EFLn]" message-citation-line-format)
+	       (autoload 'gnus-date-get-time "gnus-util")
+	       (gnus-date-get-time (mail-header-date message-reply-headers)))))
+	   (flist
+	    (let ((i ?A) lst)
+	      (when (stringp name)
+		;; Guess first name and last name:
+		(cond ((string-match
+			"\\`\\(\\w\\|[-.]\\)+ \\(\\w\\|[-.]\\)+\\'" name)
+		       (setq fname (nth 0 (split-string name "[ \t]+"))
+			     lname (nth 1 (split-string name "[ \t]+"))))
+		      ((string-match
+			"\\`\\(\\w\\|[-.]\\)+, \\(\\w\\|[-.]\\)+\\'" name)
+		       (setq fname (nth 1 (split-string name "[ \t,]+"))
+			     lname (nth 0 (split-string name "[ \t,]+"))))
+		      ((string-match
+			"\\`\\(\\w\\|[-.]\\)+\\'" name)
+		       (setq fname name
+			     lname ""))))
+	      ;; The following letters are not used in `format-time-string':
+	      (push ?E lst) (push net lst)
+	      (push ?F lst) (push fname lst)
+	      ;; We might want to use "" instead of "<X>" later.
+	      (push ?J lst) (push "<J>" lst)
+	      (push ?K lst) (push "<K>" lst)
+	      (push ?L lst) (push lname lst)
+	      (push ?N lst) (push "<N>" lst)
+	      (push ?O lst) (push "<O>" lst)
+	      (push ?P lst) (push "<P>" lst)
+	      (push ?Q lst) (push "<Q>" lst)
+	      (push ?f lst) (push "<f>" lst)
+	      (push ?i lst) (push "<i>" lst)
+	      (push ?n lst) (push name-or-net lst)
+	      (push ?o lst) (push "<o>" lst)
+	      (push ?q lst) (push "<q>" lst)
+	      (push ?t lst) (push "<t>" lst)
+	      (push ?v lst) (push "<v>" lst)
+	      ;; Delegate the rest to `format-time-string':
+	      (while (<= i ?z)
+		(when (and (not (memq i lst))
+			   ;; Skip (Z,a)
+			   (or (<= i ?Z)
+			       (>= i ?a)))
+		  (push i lst)
+		  (push (condition-case nil
+			    (progn (format-time-string (format "%%%c" i)
+						       replydate))
+			  (format ">%c<" i))
+			lst))
+		(setq i (1+ i)))
+	      (reverse lst)))
+	   (spec (apply 'format-spec-make flist)))
+      (insert (format-spec message-citation-line-format spec)))
+    (newline)
+    (newline)))
+
 (defun message-cite-original-without-signature ()
   "Cite function in the standard Message manner.
 This function strips off the signature from the original message."
@@ -3594,6 +3750,9 @@
       (save-excursion
 	(run-hooks 'message-sent-hook))
       (message "Sending...done")
+      ;; Do ecomplete address snarfing.
+      (when (message-mail-alias-type-p 'ecomplete)
+	(message-put-addresses-in-ecomplete))
       ;; Mark the buffer as unmodified and delete auto-save.
       (set-buffer-modified-p nil)
       (delete-auto-save-file-if-necessary t)
@@ -6121,16 +6280,16 @@
 	   ;; Email address in From field equals to our address
 	   (and (setq from (message-fetch-field "from"))
 		(string-equal
-		 (downcase (cadr (mail-extract-address-components from)))
-		 (downcase (cadr (mail-extract-address-components
-				  (message-make-from))))))
+		 (downcase (car (mail-header-parse-address from)))
+		 (downcase (car (mail-header-parse-address
+				 (message-make-from))))))
 	   ;; Email address in From field matches
 	   ;; 'message-alternative-emails' regexp
 	   (and from
 		message-alternative-emails
 		(string-match
 		 message-alternative-emails
-		 (cadr (mail-extract-address-components from))))))))))
+		 (car (mail-header-parse-address from))))))))))
 
 ;;;###autoload
 (defun message-cancel-news (&optional arg)
@@ -6371,13 +6530,20 @@
     (setq e (point))
     (insert
      "\n-------------------- End of forwarded message --------------------\n")
-    (when message-forward-ignored-headers
-      (save-restriction
-	(narrow-to-region b e)
-	(goto-char b)
-	(narrow-to-region (point)
-			  (or (search-forward "\n\n" nil t) (point)))
-	(message-remove-header message-forward-ignored-headers t)))))
+    (message-remove-ignored-headers b e)))
+
+(defun message-remove-ignored-headers (b e)
+  (when message-forward-ignored-headers
+    (save-restriction
+      (narrow-to-region b e)
+      (goto-char b)
+      (narrow-to-region (point)
+			(or (search-forward "\n\n" nil t) (point)))
+      (let ((ignored (if (stringp message-forward-ignored-headers)
+			 (list message-forward-ignored-headers)
+		       message-forward-ignored-headers)))
+	(dolist (elem ignored)
+	  (message-remove-header elem t))))))
 
 (defun message-forward-make-body-mime (forward-buffer)
   (insert "\n\n<#part type=message/rfc822 disposition=inline raw=t>\n")
@@ -6419,12 +6585,7 @@
     (insert "<#/mml>\n")
     (when (and (not message-forward-decoded-p)
 	       message-forward-ignored-headers)
-      (save-restriction
-	(narrow-to-region b e)
-	(goto-char b)
-	(narrow-to-region (point)
-			  (or (search-forward "\n\n" nil t) (point)))
-	(message-remove-header message-forward-ignored-headers t)))))
+      (message-remove-ignored-headers b e))))
 
 (defun message-forward-make-body-digest-plain (forward-buffer)
   (insert
@@ -7154,6 +7315,39 @@
     (if reverse
 	(not result)
       result)))
+
+(defun message-put-addresses-in-ecomplete ()
+  (dolist (header '("to" "cc" "from" "reply-to"))
+    (let ((value (message-fetch-field header)))
+      (dolist (string (mail-header-parse-addresses value 'raw))
+	(setq string
+	      (gnus-replace-in-string
+	       (gnus-replace-in-string string "^ +\\| +$" "") "\n" ""))
+	(ecomplete-add-item 'mail (car (mail-header-parse-address string))
+			    string))))
+  (ecomplete-save))
+
+(defun message-display-abbrev (&optional choose)
+  "Display the next possible abbrev for the text before point."
+  (interactive (list t))
+  (when (and (member (char-after (point-at-bol)) '(?C ?T ? ))
+	     (message-point-in-header-p)
+	     (save-excursion
+	       (save-restriction
+		 (message-narrow-to-field)
+		 (goto-char (point-min))
+		 (looking-at "To\\|Cc"))))
+    (let* ((end (point))
+	   (start (save-excursion
+		    (and (re-search-backward "[\n\t ]" nil t)
+			 (1+ (point)))))
+	   (word (when start (buffer-substring start end)))
+	   (match (when (and word
+			     (not (zerop (length word))))
+		    (ecomplete-display-matches 'mail word choose))))
+      (when (and choose match)
+	(delete-region start end)
+	(insert match)))))
 
 (when (featurep 'xemacs)
   (require 'messagexmas)
Index: gnus/lisp/mm-decode.el
diff -u gnus/lisp/mm-decode.el:7.42 gnus/lisp/mm-decode.el:7.45
--- gnus/lisp/mm-decode.el:7.42	Thu Mar 23 15:25:20 2006
+++ gnus/lisp/mm-decode.el	Wed Apr 26 14:31:41 2006
@@ -307,7 +307,7 @@
     "application/pkcs7-signature" "application/x-pkcs7-mime"
     "application/pkcs7-mime"
     ;; Mutt still uses this even though it has already been withdrawn.
-    "application/pgp")
+    "application/pgp\\'")
   "A list of MIME types to be displayed automatically."
   :type '(repeat regexp)
   :group 'mime-display)
@@ -436,7 +436,11 @@
 (defcustom mm-verify-option 'never
   "Option of verifying signed parts.
 `never', not verify; `always', always verify;
-`known', only verify known protocols.  Otherwise, ask user."
+`known', only verify known protocols.  Otherwise, ask user.
+
+When set to `always' or `known', you should add
+\"multipart/signed\" to `gnus-buttonized-mime-types' to see
+result of the verification."
   :version "22.1"
   :type '(choice (item always)
 		 (item never)
@@ -666,7 +670,14 @@
     (mailcap-parse-mailcaps)
     (if (mm-handle-displayed-p handle)
 	(mm-remove-part handle)
-      (let* ((type (mm-handle-media-type handle))
+      (let* ((ehandle (if (equal (mm-handle-media-type handle)
+				 "message/external-body")
+			  (progn
+			    (unless (mm-handle-cache handle)
+			      (mm-extern-cache-contents handle))
+			    (mm-handle-cache handle))
+			handle))
+	     (type (mm-handle-media-type ehandle))
 	     (method (mailcap-mime-info type))
 	     (filename (or (mail-content-type-get
 			    (mm-handle-disposition handle) 'filename)
@@ -674,8 +685,8 @@
 			    (mm-handle-type handle) 'name)
 			   "<file>"))
 	     (external mm-enable-external))
-	(if (and (mm-inlinable-p handle)
-		 (mm-inlined-p handle))
+	(if (and (mm-inlinable-p ehandle)
+		 (mm-inlined-p ehandle))
 	    (progn
 	      (forward-line 1)
 	      (mm-display-inline handle)
@@ -683,7 +694,7 @@
 	  (when (or method
 		    (not no-default))
 	    (if (and (not method)
-		     (equal "text" (car (split-string type))))
+		     (equal "text" (car (split-string type "/"))))
 		(progn
 		  (forward-line 1)
 		  (mm-insert-inline handle (mm-get-part handle))
Index: gnus/lisp/mm-extern.el
diff -u gnus/lisp/mm-extern.el:7.8 gnus/lisp/mm-extern.el:7.9
--- gnus/lisp/mm-extern.el:7.8	Fri Mar 17 11:43:26 2006
+++ gnus/lisp/mm-extern.el	Wed Apr 12 04:00:49 2006
@@ -157,25 +157,11 @@
     (save-excursion
       (save-restriction
 	(narrow-to-region (point) (point))
-	(let* ((type (regexp-quote
-		      (mm-handle-media-type (mm-handle-cache handle))))
-	       ;; Force the part to be displayed (but if there is no
-	       ;; method to display, a user will be prompted to save).
-	       ;; See `gnus-mime-display-single'.
-	       (mm-inline-override-types nil)
-	       (mm-attachment-override-types
-		(cons type mm-attachment-override-types))
-	       (mm-automatic-display (cons type mm-automatic-display))
-	       (mm-automatic-external-display
-		(cons type mm-automatic-external-display))
-	       ;; Suppress adding of button to the cached part.
-	       (gnus-inhibit-mime-unbuttonizing nil))
-	  (gnus-display-mime (mm-handle-cache handle)))
-	;; Move undisplayer added to the cached handle to the parent.
-	(mm-handle-set-undisplayer
-	 handle
-	 (mm-handle-undisplayer (mm-handle-cache handle)))
-	(mm-handle-set-undisplayer (mm-handle-cache handle) nil)))))
+	(mm-display-part (mm-handle-cache handle))))
+    ;; Move undisplayer added to the cached handle to the parent.
+    (mm-handle-set-undisplayer
+     handle (mm-handle-undisplayer (mm-handle-cache handle)))
+    (mm-handle-set-undisplayer (mm-handle-cache handle) nil)))
 
 (provide 'mm-extern)
 
Index: gnus/lisp/mm-url.el
diff -u gnus/lisp/mm-url.el:7.13 gnus/lisp/mm-url.el:7.15
--- gnus/lisp/mm-url.el:7.13	Fri Jan 20 09:35:06 2006
+++ gnus/lisp/mm-url.el	Sun Apr 30 11:44:06 2006
@@ -36,11 +36,6 @@
 (require 'mm-util)
 (require 'gnus)
 
-(eval-when-compile
-  (if (featurep 'xemacs)
-      (require 'timer-funcs)
-    (require 'timer)))
-
 (defvar url-current-object)
 (defvar url-package-name)
 (defvar url-package-version)
@@ -299,7 +294,6 @@
 	(list url (buffer-size)))
     (mm-url-load-url)
     (let ((name buffer-file-name)
-	  (url-request-extra-headers (list (cons "Connection" "Close")))
 	  (url-package-name (or mm-url-package-name
 				url-package-name))
 	  (url-package-version (or mm-url-package-version
Index: gnus/lisp/mm-util.el
diff -u gnus/lisp/mm-util.el:7.48 gnus/lisp/mm-util.el:7.51
--- gnus/lisp/mm-util.el:7.48	Mon Mar  6 11:28:49 2006
+++ gnus/lisp/mm-util.el	Sun Apr 30 11:44:06 2006
@@ -30,6 +30,13 @@
 (require 'mail-prsvr)
 
 (eval-and-compile
+  (if (featurep 'xemacs)
+      (unless (ignore-errors
+		(require 'timer-funcs))
+	(require 'timer))
+    (require 'timer)))
+
+(eval-and-compile
   (mapcar
    (lambda (elem)
      (let ((nfunc (intern (format "mm-%s" (car elem)))))
@@ -502,7 +509,7 @@
 If ALLOW-OVERRIDE is given, use `mm-charset-override-alist' to
 map undesired charset names to their replacement.  This should
 only be used for decoding, not for encoding."
-  ;; OVERRIDE is used (only) in `mm-decode-body'.
+  ;; OVERRIDE is used (only) in `mm-decode-body' and `mm-decode-string'.
   (when (stringp charset)
     (setq charset (intern (downcase charset))))
   (when lbt
@@ -1210,7 +1217,7 @@
 	      (coding-system-for-write mm-binary-coding-system)
 	      retval err-msg)
 	  (message "%s" msg)
-	  (with-temp-buffer
+	  (mm-with-unibyte-buffer
 	    (insert-buffer-substring cur)
 	    (condition-case err
 		(progn
Index: gnus/lisp/mm-uu.el
diff -u gnus/lisp/mm-uu.el:7.35 gnus/lisp/mm-uu.el:7.40
--- gnus/lisp/mm-uu.el:7.35	Mon Mar 13 10:32:28 2006
+++ gnus/lisp/mm-uu.el	Fri Apr 28 07:17:40 2006
@@ -461,7 +461,9 @@
     ((eq mm-verify-option 'never) nil)
     ((eq mm-verify-option 'always) t)
     ((eq mm-verify-option 'known) t)
-    (t (y-or-n-p "Verify pgp signed part? ")))))
+    (t (prog1
+	   (y-or-n-p "Verify pgp signed part? ")
+	 (message ""))))))
 
 (eval-when-compile
   (defvar gnus-newsgroup-charset))
@@ -512,15 +514,51 @@
     ((eq mm-decrypt-option 'never) nil)
     ((eq mm-decrypt-option 'always) t)
     ((eq mm-decrypt-option 'known) t)
-    (t (y-or-n-p "Decrypt pgp encrypted part? ")))))
+    (t (prog1
+	   (y-or-n-p "Decrypt pgp encrypted part? ")
+	 (message ""))))))
 
 (defun mm-uu-pgp-encrypted-extract-1 (handles ctl)
-  (let ((buf (mm-uu-copy-to-buffer (point-min) (point-max))))
-    (if (mm-uu-pgp-encrypted-test)
-	(with-current-buffer buf
-	  (mml2015-clean-buffer)
-	  (funcall (mml2015-clear-decrypt-function))))
-    (list (mm-make-handle buf mm-uu-text-plain-type))))
+  (let ((buf (mm-uu-copy-to-buffer (point-min) (point-max)))
+	(first t)
+	charset)
+    ;; Make sure there's a blank line between header and body.
+    (with-current-buffer buf
+      (goto-char (point-min))
+      (while (prog2
+		 (forward-line 1)
+		 (if first
+		     (looking-at "[^\t\n ]+:")
+		   (looking-at "[^\t\n ]+:\\|[\t ]"))
+	       (setq first nil)))
+      (unless (memq (char-after) '(?\n nil))
+	(insert "\n"))
+      (save-restriction
+	(narrow-to-region (point-min) (point))
+	(setq charset (mail-fetch-field "charset")))
+      (if (and (mm-uu-pgp-encrypted-test)
+	       (progn
+		 (mml2015-clean-buffer)
+		 (funcall (mml2015-clear-decrypt-function))
+		 (equal (mm-handle-multipart-ctl-parameter mm-security-handle
+							   'gnus-info)
+			"OK")))
+	  (progn
+	    ;; Decode charset.
+	    (if (and (or charset
+			 (setq charset gnus-newsgroup-charset))
+		     (setq charset (mm-charset-to-coding-system charset))
+		     (not (eq charset 'ascii)))
+		;; Assume that buffer's multibyteness is turned off.
+		;; See `mml2015-pgg-clear-decrypt'.
+		(insert (mm-decode-coding-string (prog1
+						     (buffer-string)
+						   (erase-buffer)
+						   (mm-enable-multibyte))
+						 charset))
+	      (mm-enable-multibyte))
+	    (list (mm-make-handle buf mm-uu-text-plain-type)))
+	(list (mm-make-handle buf '("application/pgp-encrypted")))))))
 
 (defun mm-uu-pgp-encrypted-extract ()
   (let ((mm-security-handle (list (format "multipart/encrypted"))))
Index: gnus/lisp/mm-view.el
diff -u gnus/lisp/mm-view.el:7.40 gnus/lisp/mm-view.el:7.42
--- gnus/lisp/mm-view.el:7.40	Mon Mar  6 07:53:12 2006
+++ gnus/lisp/mm-view.el	Thu Apr 20 00:17:04 2006
@@ -422,7 +422,8 @@
       (save-restriction
 	(narrow-to-region b (point))
 	(goto-char b)
-	(fill-flowed)
+	(fill-flowed nil (equal (cdr (assoc 'delsp (mm-handle-type handle)))
+				"yes"))
 	(goto-char (point-max))))
     (save-restriction
       (narrow-to-region b (point))
Index: gnus/lisp/mml.el
diff -u gnus/lisp/mml.el:7.45 gnus/lisp/mml.el:7.48
--- gnus/lisp/mml.el:7.45	Thu Mar 23 15:25:20 2006
+++ gnus/lisp/mml.el	Wed Apr 26 16:57:36 2006
@@ -40,9 +40,7 @@
   (autoload 'message-mark-active-p "message")
   (autoload 'message-info "message")
   (autoload 'fill-flowed-encode "flow-fill")
-  (autoload 'message-posting-charset "message"))
-
-(eval-when-compile
+  (autoload 'message-posting-charset "message")
   (autoload 'dnd-get-local-file-name "dnd"))
 
 (defvar gnus-article-mime-handles)
@@ -54,6 +52,7 @@
 (defvar message-posting-charset)
 (defvar message-required-mail-headers)
 (defvar message-required-news-headers)
+(defvar dnd-protocol-alist)
 
 (defcustom mml-content-type-parameters
   '(name access-type expiration size permission format)
@@ -1006,8 +1005,7 @@
     (easy-menu-add mml-menu mml-mode-map)
     (when (boundp 'dnd-protocol-alist)
       (set (make-local-variable 'dnd-protocol-alist)
-	   (append mml-dnd-protocol-alist
-		   (symbol-value 'dnd-protocol-alist))))
+	   (append mml-dnd-protocol-alist dnd-protocol-alist)))
     (run-hooks 'mml-mode-hook)))
 
 ;;;
@@ -1015,9 +1013,18 @@
 ;;; inserting stuff to the buffer.
 ;;;
 
+(defcustom mml-default-directory mm-default-directory
+  "The default directory where mml will find files.
+If not set, `default-directory' will be used."
+  :type '(choice directory (const :tag "Default" nil))
+  :version "23.0" ;; No Gnus
+  :group 'message)
+
 (defun mml-minibuffer-read-file (prompt)
   (let* ((completion-ignored-extensions nil)
-	 (file (read-file-name prompt nil nil t)))
+	 (file (read-file-name prompt
+			       (or mml-default-directory default-directory)
+			       nil t)))
     ;; Prevent some common errors.  This is inspired by similar code in
     ;; VM.
     (when (file-directory-p file)
@@ -1114,7 +1121,7 @@
 as in other buffers."
   :type '(choice (repeat (cons (regexp) (function)))
 		 (const :tag "Behave as in other buffers" nil))
-  :version "23.0" ;; No Gnus
+  :version "22.1" ;; Gnus 5.10.9
   :group 'message)
 
 (defcustom mml-dnd-attach-options nil
@@ -1132,7 +1139,7 @@
 		(const type)
 		(const description)
 		(const disposition))))
-  :version "23.0" ;; No Gnus
+  :version "22.1" ;; Gnus 5.10.9
   :group 'message)
 
 (defun mml-attach-file (file &optional type description disposition)
Index: gnus/lisp/mml1991.el
diff -u gnus/lisp/mml1991.el:7.8 gnus/lisp/mml1991.el:7.10
--- gnus/lisp/mml1991.el:7.8	Thu Feb  9 06:47:53 2006
+++ gnus/lisp/mml1991.el	Thu Apr 27 09:00:49 2006
@@ -230,22 +230,22 @@
 
 (defun mml1991-pgg-sign (cont)
   (let ((pgg-text-mode t)
+	(pgg-default-user-id (or (message-options-get 'mml-sender)
+				 pgg-default-user-id))
 	headers cte)
     ;; Don't sign headers.
     (goto-char (point-min))
-    (while (not (looking-at "^$"))
-      (forward-line))
-    (unless (eobp) ;; no headers?
+    (when (re-search-forward "^$" nil t)
       (setq headers (buffer-substring (point-min) (point)))
-      (forward-line) ;; skip header/body separator
-      (delete-region (point-min) (point)))
-    (when (string-match "^Content-Transfer-Encoding: \\(.+\\)" headers)
-      (setq cte (intern (match-string 1 headers))))
-    (mm-decode-content-transfer-encoding cte)
-    (unless (let ((pgg-default-user-id
-		   (or (message-options-get 'mml-sender)
-		       pgg-default-user-id)))
-	      (pgg-sign-region (point-min) (point-max) t))
+      (save-restriction
+	(narrow-to-region (point-min) (point))
+	(setq cte (mail-fetch-field "content-transfer-encoding")))
+      (forward-line 1)
+      (delete-region (point-min) (point))
+      (when cte
+	(setq cte (intern (downcase cte)))
+	(mm-decode-content-transfer-encoding cte)))
+    (unless (pgg-sign-region (point-min) (point-max) t)
       (pop-to-buffer pgg-errors-buffer)
       (error "Encrypt error"))
     (delete-region (point-min) (point-max))
@@ -254,7 +254,8 @@
       (goto-char (point-min))
       (while (re-search-forward "\r+$" nil t)
 	(replace-match "" t t))
-      (mm-encode-content-transfer-encoding cte)
+      (when cte
+	(mm-encode-content-transfer-encoding cte))
       (goto-char (point-min))
       (when headers
 	(insert headers))
@@ -262,18 +263,18 @@
     t))
 
 (defun mml1991-pgg-encrypt (cont &optional sign)
-  (let ((pgg-text-mode t)
-	cte)
-    ;; Strip MIME Content[^ ]: headers since it will be ASCII ARMOURED
-    (goto-char (point-min))
-    (while (looking-at "^Content[^ ]+:")
-      (when (looking-at "^Content-Transfer-Encoding: \\(.+\\)")
-	(setq cte (intern (match-string 1))))
-      (forward-line))
-    (unless (bobp)
-      (delete-region (point-min) (point)))
-    (mm-decode-content-transfer-encoding cte)
-    (unless (pgg-encrypt-region
+  (goto-char (point-min))
+  (when (re-search-forward "^$" nil t)
+    (let ((cte (save-restriction
+		 (narrow-to-region (point-min) (point))
+		 (mail-fetch-field "content-transfer-encoding"))))
+      ;; Strip MIME headers since it will be ASCII armoured.
+      (forward-line 1)
+      (delete-region (point-min) (point))
+      (when cte
+	(mm-decode-content-transfer-encoding (intern (downcase cte))))))
+  (unless (let ((pgg-text-mode t))
+	    (pgg-encrypt-region
 	     (point-min) (point-max)
 	     (split-string
 	      (or
@@ -281,15 +282,13 @@
 	       (message-options-set 'message-recipients
 				    (read-string "Recipients: ")))
 	      "[ \f\t\n\r\v,]+")
-	     sign)
-      (pop-to-buffer pgg-errors-buffer)
-      (error "Encrypt error"))
-    (delete-region (point-min) (point-max))
-    ;;(insert "Content-Type: application/pgp-encrypted\n\n")
-    ;;(insert "Version: 1\n\n")
-    (insert "\n")
-    (insert-buffer-substring pgg-output-buffer)
-    t))
+	     sign))
+    (pop-to-buffer pgg-errors-buffer)
+    (error "Encrypt error"))
+  (delete-region (point-min) (point-max))
+  (insert "\n")
+  (insert-buffer-substring pgg-output-buffer)
+  t)
 
 ;;;###autoload
 (defun mml1991-encrypt (cont &optional sign)
Index: gnus/lisp/mml2015.el
diff -u gnus/lisp/mml2015.el:7.14 gnus/lisp/mml2015.el:7.15
--- gnus/lisp/mml2015.el:7.14	Thu Feb  9 06:47:53 2006
+++ gnus/lisp/mml2015.el	Fri Apr 28 07:17:40 2006
@@ -711,6 +711,8 @@
 	     (buffer-string))))
 	(progn
 	  (erase-buffer)
+	  ;; Treat data which pgg returns as a unibyte string.
+	  (mm-disable-multibyte)
 	  (insert-buffer-substring pgg-output-buffer)
 	  (goto-char (point-min))
 	  (while (search-forward "\r\n" nil t)
Index: gnus/lisp/nnagent.el
diff -u gnus/lisp/nnagent.el:7.8 gnus/lisp/nnagent.el:7.10
--- gnus/lisp/nnagent.el:7.8	Wed Feb  8 05:17:15 2006
+++ gnus/lisp/nnagent.el	Fri Apr 14 17:58:07 2006
@@ -130,7 +130,8 @@
 	    (gnus-method-to-server gnus-command-method)
 	    "\"")
     (insert ")\n")
-    (append-to-file (point-min) (point-max) (gnus-agent-lib-file "flags")))
+    (write-region (point-min) (point-max) (gnus-agent-lib-file "flags")
+		  t 'silent))
   nil)
 
 (deffoo nnagent-retrieve-headers (articles &optional group server fetch-old)
Index: gnus/lisp/nnheaderxm.el
diff -u gnus/lisp/nnheaderxm.el:7.5 gnus/lisp/nnheaderxm.el:7.6
--- gnus/lisp/nnheaderxm.el:7.5	Wed Jul  6 08:42:01 2005
+++ gnus/lisp/nnheaderxm.el	Sun Apr 30 11:44:06 2006
@@ -27,8 +27,6 @@
 
 ;;; Code:
 
-(require 'timer-funcs)
-
 (defalias 'nnheader-cancel-timer 'delete-itimer)
 (defalias 'nnheader-string-as-multibyte 'identity)
 
Index: gnus/lisp/nntp.el
diff -u gnus/lisp/nntp.el:7.32 gnus/lisp/nntp.el:7.33
--- gnus/lisp/nntp.el:7.32	Fri Jan 20 09:35:06 2006
+++ gnus/lisp/nntp.el	Mon Apr 17 15:30:51 2006
@@ -1386,22 +1386,22 @@
 
 (defun nntp-accept-process-output (process)
   "Wait for output from PROCESS and message some dots."
-  (save-excursion
-    (set-buffer (or (nntp-find-connection-buffer nntp-server-buffer)
-		    nntp-server-buffer))
+  (with-current-buffer (or (nntp-find-connection-buffer nntp-server-buffer)
+                           nntp-server-buffer)
     (let ((len (/ (buffer-size) 1024))
 	  message-log-max)
       (unless (< len 10)
 	(setq nntp-have-messaged t)
 	(nnheader-message 7 "nntp read: %dk" len)))
-    (nnheader-accept-process-output process)
-    ;; accept-process-output may update status of process to indicate
-    ;; that the server has closed the connection.  This MUST be
-    ;; handled here as the buffer restored by the save-excursion may
-    ;; be the process's former output buffer (i.e. now killed)
-    (or (and process
-	     (memq (process-status process) '(open run)))
-        (nntp-report "Server closed connection"))))
+    (prog1
+	(nnheader-accept-process-output process)
+      ;; accept-process-output may update status of process to indicate
+      ;; that the server has closed the connection.  This MUST be
+      ;; handled here as the buffer restored by the save-excursion may
+      ;; be the process's former output buffer (i.e. now killed)
+      (or (and process
+	       (memq (process-status process) '(open run)))
+          (nntp-report "Server closed connection")))))
 
 (defun nntp-accept-response ()
   "Wait for output from the process that outputs to BUFFER."
Index: gnus/lisp/nnweb.el
diff -u gnus/lisp/nnweb.el:7.19 gnus/lisp/nnweb.el:7.21
--- gnus/lisp/nnweb.el:7.19	Tue Apr  4 23:35:07 2006
+++ gnus/lisp/nnweb.el	Mon May  1 14:22:28 2006
@@ -171,7 +171,8 @@
 		       (when (string-match "^<\\(.*\\)>$" article)
 			 (setq art (match-string 1 article)))
 		       (when (and fetch art)
-			 (setq url (format fetch art))
+			 (setq url (format fetch
+					   (mm-url-form-encode-xwfu art)))
 			 (mm-with-unibyte-current-buffer
 			   (mm-url-insert url))
 			 (if (nnweb-definition 'reference t)
@@ -307,8 +308,8 @@
 (defun nnweb-google-wash-article ()
   ;; We have Google's masked e-mail addresses here.  :-/
   (let ((case-fold-search t)
-	(start-re "<pre>\n *")
-	(end-re "\n *</pre>"))
+	(start-re "<pre>[\r\n ]*")
+	(end-re "[\r\n ]*</pre>"))
     (goto-char (point-min))
     (if (save-excursion
 	  (or (re-search-forward "The requested message.*could not be found."
Index: gnus/lisp/password.el
diff -u gnus/lisp/password.el:7.11 gnus/lisp/password.el:7.12
--- gnus/lisp/password.el:7.11	Wed Apr  5 13:15:11 2006
+++ gnus/lisp/password.el	Sun Apr 30 11:44:06 2006
@@ -59,9 +59,6 @@
 
 ;;; Code:
 
-(when (featurep 'xemacs)
-  (require 'timer-funcs))
-
 (eval-when-compile
   (require 'cl))
 
Index: gnus/lisp/rfc2231.el
diff -u gnus/lisp/rfc2231.el:7.14 gnus/lisp/rfc2231.el:7.19
--- gnus/lisp/rfc2231.el:7.14	Thu Feb 16 09:23:17 2006
+++ gnus/lisp/rfc2231.el	Tue Apr 18 10:00:10 2006
@@ -53,8 +53,7 @@
     (let ((ttoken (ietf-drums-token-to-list ietf-drums-text-token))
 	  (stoken (ietf-drums-token-to-list ietf-drums-tspecials))
 	  (ntoken (ietf-drums-token-to-list "0-9"))
-	  c type attribute encoded number prev-attribute vals
-	  prev-encoded parameters value)
+	  c type attribute encoded number parameters value)
       (ietf-drums-init
        (condition-case nil
 	   (mail-header-remove-whitespace
@@ -142,19 +141,6 @@
 			    (setq c (char-after)))))
 		    (setq number nil
 			  encoded nil))
-		  ;; See if we have any previous continuations.
-		  (when (and prev-attribute
-			     (not (eq prev-attribute attribute)))
-		    (setq vals
-			  (mapconcat 'cdr (sort vals 'car-less-than-car) ""))
-		    (push (cons prev-attribute
-				(if prev-encoded
-				    (rfc2231-decode-encoded-string vals)
-				  vals))
-			  parameters)
-		    (setq prev-attribute nil
-			  vals nil
-			  prev-encoded nil))
 		  (unless (eq c ?=)
 		    (error "Invalid header: %s" string))
 		  (forward-char 1)
@@ -187,33 +173,33 @@
 			     (point)))))
 		   (t
 		    (error "Invalid header: %s" string)))
-		  (if number
-		      (progn
-			(push (cons number value) vals)
-			(setq prev-attribute attribute
-			      prev-encoded encoded))
-		    (push (cons attribute
-				(if encoded
-				    (rfc2231-decode-encoded-string value)
-				  value))
-			  parameters))))
-
-	      ;; Take care of any final continuations.
-	      (when prev-attribute
-		(setq vals (mapconcat 'cdr (sort vals 'car-less-than-car) ""))
-		(push (cons prev-attribute
-			    (if prev-encoded
-				(rfc2231-decode-encoded-string vals)
-			      vals))
-		      parameters)))
+		  (push (list attribute value number encoded)
+			parameters))))
 	  (error
 	   (setq parameters nil)
-	   (if signal-error
-	       (signal (car err) (cdr err))
-	     ;;(message "%s" (error-message-string err))
-	     )))
+	   (when signal-error
+	     (signal (car err) (cdr err)))))
 
-	(cons type (nreverse parameters))))))
+	;; Now collect and concatenate continuation parameters.
+	(let ((cparams nil)
+	      elem)
+	  (loop for (attribute value part encoded)
+		in (sort parameters (lambda (e1 e2)
+				      (< (or (caddr e1) 0)
+					 (or (caddr e2) 0))))
+		do (if (or (not (setq elem (assq attribute cparams)))
+			   (and (numberp part)
+				(zerop part)))
+		       (push (list attribute value encoded) cparams)
+		     (setcar (cdr elem) (concat (cadr elem) value))))
+	  ;; Finally decode encoded values.
+	  (cons type (mapcar
+		      (lambda (elem)
+			(cons (car elem)
+			      (if (nth 2 elem)
+				  (rfc2231-decode-encoded-string (nth 1 elem))
+				(nth 1 elem))))
+		      (nreverse cparams))))))))
 
 (defun rfc2231-decode-encoded-string (string)
   "Decode an RFC2231-encoded string.
@@ -227,7 +213,7 @@
   (let ((coding-system (mm-charset-to-coding-system (match-string 1 string)))
 	;;(language (match-string 2 string))
 	(value (match-string 3 string)))
-    (mm-with-multibyte-buffer
+    (mm-with-unibyte-buffer
       (insert value)
       (goto-char (point-min))
       (while (search-forward "%" nil t)
@@ -236,9 +222,9 @@
 	     (string-to-number (buffer-substring (point) (+ (point) 2)) 16)
 	   (delete-region (1- (point)) (+ (point) 2)))))
       ;; Decode using the charset, if any.
-      (unless (memq coding-system '(nil ascii))
-	(mm-decode-coding-region (point-min) (point-max) coding-system))
-      (buffer-string))))
+      (if (memq coding-system '(nil ascii))
+	  (buffer-string)
+	(mm-decode-coding-string (buffer-string) coding-system)))))
 
 (defun rfc2231-encode-string (param value)
   "Return and PARAM=VALUE string encoded according to RFC2231.
@@ -252,7 +238,7 @@
 	;; Don't make lines exceeding 76 column.
 	(limit (- 74 (length param)))
 	spacep encodep charsetp charset broken)
-    (with-temp-buffer
+    (mm-with-multibyte-buffer
       (insert value)
       (goto-char (point-min))
       (while (not (eobp))
@@ -268,6 +254,7 @@
 	(forward-char 1))
       (when charsetp
 	(setq charset (mm-encode-body)))
+      (mm-disable-multibyte)
       (cond
        ((or encodep charsetp
 	    (progn
Index: gnus/lisp/smiley.el
diff -u gnus/lisp/smiley.el:7.10 gnus/lisp/smiley.el:7.15
--- gnus/lisp/smiley.el:7.10	Tue Mar 21 21:39:22 2006
+++ gnus/lisp/smiley.el	Sat Apr 15 18:01:35 2006
@@ -58,23 +58,65 @@
   "Turn :-)'s into real images."
   :group 'gnus-visual)
 
-;; Maybe this should go.
-(defcustom smiley-data-directory
-  (nnheader-find-etc-directory "images/smilies")
-  "Location of the smiley faces files."
+(defvar smiley-data-directory)
+
+(defcustom smiley-style
+  (if (or (and (fboundp 'face-attribute)
+	       (>= (face-attribute 'default :height) 160))
+	  (and (fboundp 'face-height)
+	       (>= (face-height 'default) 14)))
+      'medium
+    'low-color)
+  "Smiley style."
+  :type '(choice (const :tag "small, 3 colors" low-color) ;; 13x14
+		 (const :tag "medium, ~10 colors" medium) ;; 16x16
+		 (const :tag "dull, grayscale" grayscale));; 14x14
+  :set (lambda (symbol value)
+	 (set-default symbol value)
+	 (setq smiley-data-directory (smiley-directory))
+	 (smiley-update-cache))
+  :initialize 'custom-initialize-default
+  :version "23.0" ;; No Gnus
+  :group 'smiley)
+
+;; For compatibility, honor the variable `smiley-data-directory' if the user
+;; has set it.
+
+(defun smiley-directory (&optional style)
+  "Return a the location of the smiley faces files.
+STYLE specifies which style to use, see `smiley-style'.  If STYLE
+is nil, use `smiley-style'."
+  (unless style (setq style smiley-style))
+  (nnheader-find-etc-directory
+   (concat "images/smilies"
+	   (cond ((eq smiley-style 'low-color) "")
+		 ((eq smiley-style 'medium) "/medium")
+		 ((eq smiley-style 'grayscale) "/grayscale")))))
+
+(defcustom smiley-data-directory (smiley-directory)
+  "*Location of the smiley faces files."
+  :set (lambda (symbol value)
+	 (set-default symbol value)
+	 (smiley-update-cache))
+  :initialize 'custom-initialize-default
   :type 'directory
   :group 'smiley)
 
 ;; The XEmacs version has a baroque, if not rococo, set of these.
 (defcustom smiley-regexp-alist
-  '(("\\(:-?)\\)\\W" 1 "smile")
-    ("\\(;-?)\\)\\W" 1 "blink")
+  '(("\\(;-?)\\)\\W" 1 "blink")
     ("\\(:-]\\)\\W" 1 "forced")
     ("\\(8-)\\)\\W" 1 "braindamaged")
     ("\\(:-|\\)\\W" 1 "indifferent")
     ("\\(:-[/\\]\\)\\W" 1 "wry")
     ("\\(:-(\\)\\W" 1 "sad")
-    ("\\(:-{\\)\\W" 1 "frown"))
+    ("\\(:-{\\)\\W" 1 "frown")
+    ("\\(>:-)\\)\\W" 1 "evil")
+    ("\\(;-(\\)\\W" 1 "cry")
+    ("\\(X-)\\)\\W" 1 "dead")
+    ("\\(:-D\\)\\W" 1 "grin")
+    ;; "smile" must be come after "evil"
+    ("\\(\\^?:-?)\\)\\W" 1 "smile"))
   "*A list of regexps to map smilies to images.
 The elements are (REGEXP MATCH IMAGE), where MATCH is the submatch in
 regexp to replace with IMAGE.  IMAGE is the name of an image file in
Index: gnus/lisp/spam.el
diff -u gnus/lisp/spam.el:7.81 gnus/lisp/spam.el:7.82
--- gnus/lisp/spam.el:7.81	Tue Mar 21 12:56:27 2006
+++ gnus/lisp/spam.el	Sun Apr 16 18:33:40 2006
@@ -1156,6 +1156,8 @@
       (push 'X-Spam-Status list))
     (when spam-use-bogofilter
       (push 'X-Bogosity list))
+    (when spam-use-crm114
+      (push 'X-CRM114-Status list))
     list))
 
 (defun spam-user-format-function-S (headers)
@@ -1186,24 +1188,25 @@
 (defun spam-extra-header-to-number (header headers)
   "Transform an extra HEADER to a number, using list of HEADERS.
 Note this has to be fast."
-  (if (gnus-extra-header header headers)
-      (cond
-       ((eq header 'X-Spam-Status)
-	(string-to-number (gnus-replace-in-string
-			   (gnus-extra-header header headers)
-			   spam-spamassassin-score-regexp
-			   "\\1")))
-       ;; for CRM checking, it's probably faster to just do the string match
-       ((and spam-use-crm114 (string-match "( pR: \\([0-9.-]+\\)" header))
-	(match-string 1 header))
-       ((eq header 'X-Bogosity)
-	(string-to-number (gnus-replace-in-string
-			   (gnus-replace-in-string
-			    (gnus-extra-header header headers)
-			    ".*spamicity=" "")
-			   ",.*" "")))
-       (t nil))
-    nil))
+  (let ((header-content (gnus-extra-header header headers)))
+    (if header-content
+        (cond
+         ((eq header 'X-Spam-Status)
+          (string-to-number (gnus-replace-in-string
+                             header-content
+                             spam-spamassassin-score-regexp
+                             "\\1")))
+         ;; for CRM checking, it's probably faster to just do the string match
+         ((and spam-use-crm114 (string-match "( pR: \\([0-9.-]+\\)" header-content))
+          (string-to-number (match-string 1 header-content)))
+         ((eq header 'X-Bogosity)
+          (string-to-number (gnus-replace-in-string
+                             (gnus-replace-in-string
+                              header-content
+                              ".*spamicity=" "")
+                             ",.*" "")))
+         (t nil))
+      nil)))
 
 (defun spam-summary-score (headers &optional specific-header)
   "Score an article for the summary buffer, as fast as possible.
Index: gnus/texi/.cvsignore
diff -u gnus/texi/.cvsignore:7.2 gnus/texi/.cvsignore:7.3
--- gnus/texi/.cvsignore:7.2	Mon Jan  5 00:09:58 2004
+++ gnus/texi/.cvsignore	Wed Apr 12 07:51:08 2006
@@ -38,3 +38,4 @@
 thumb*
 auto
 *.tpt
+gnus-coding
Index: gnus/texi/ChangeLog
diff -u gnus/texi/ChangeLog:7.262 gnus/texi/ChangeLog:7.273
--- gnus/texi/ChangeLog:7.262	Tue Apr 11 16:17:52 2006
+++ gnus/texi/ChangeLog	Thu Apr 27 00:27:14 2006
@@ -1,3 +1,50 @@
+2006-04-22  Lars Magne Ingebrigtsen  <[email protected]>
+
+	* gnus.texi (Spam Package Introduction): Fix spam menu and links. 
+
+2006-04-26  Reiner Steib  <[email protected]>
+
+	* pgg.texi (Caching passphrase): Fix markup and typos.  Simplify.
+
+2006-04-26  Sascha Wilde  <[email protected]>
+
+	* pgg.texi (Caching passphrase): Added documentation for
+	pgg-gpg-use-agent.
+
+2006-04-20  Reiner Steib  <[email protected]>
+
+	* gnus.texi (Spam Statistics Package): Fix typo in @pxref.
+	(Splitting mail using spam-stat): Fix @xref.
+
+2006-04-20  Chong Yidong <[email protected]>
+
+	* gnus.texi (Spam Package): Major revision of the text.  Previouly
+	this node was "Filtering Spam Using The Spam ELisp Package".
+
+2006-04-18  Reiner Steib  <[email protected]>
+
+	* gnus-refcard.tex: Remove duplicate \def's.  Update date.
+
+2006-04-18  Lars Magne Ingebrigtsen  <[email protected]>
+
+	* gnus.texi (SpamAssassin back end): Fix typo.
+
+	* sieve.texi (Examples): Fix grammar.
+
+2006-04-16  Lars Magne Ingebrigtsen  <[email protected]>
+
+	* gnus.texi (Searching for Articles): Document M-S and M-R.
+	(Limiting): Document / b.
+
+2006-04-15  Lars Magne Ingebrigtsen  <[email protected]>
+
+	* gnus.texi (Thread Commands): T M-^.
+
+2006-04-14  Lars Magne Ingebrigtsen  <[email protected]>
+
+	* message.texi (Mail Aliases): Document ecomplete.
+	(Mail Aliases): Fix typo.
+
 2006-04-11  Reiner Steib  <[email protected]>
 
 	* gnus.texi, gnus-faq.texi, message.texi: No Gnus v0.4 is released.
Index: gnus/texi/gnus-faq.texi
diff -u gnus/texi/gnus-faq.texi:7.11 gnus/texi/gnus-faq.texi:7.12
--- gnus/texi/gnus-faq.texi:7.11	Tue Mar 28 20:13:58 2006
+++ gnus/texi/gnus-faq.texi	Wed Apr 12 01:23:19 2006
@@ -128,7 +128,7 @@
 Jingle please: Gnus 5.10 is released, get it while it's
 hot! As well as the step in version number is rather
 small, Gnus 5.10 has tons of new features which you
-shouldn't miss. The current release (5.10.6) should be at
+shouldn't miss. The current release (5.10.8) should be at
 least as stable as the latest release of the 5.8 series.
 
 @node [1.2]
Index: gnus/texi/gnus-refcard.tex
diff -u gnus/texi/gnus-refcard.tex:7.3 gnus/texi/gnus-refcard.tex:7.4
--- gnus/texi/gnus-refcard.tex:7.3	Wed Feb  8 05:17:16 2006
+++ gnus/texi/gnus-refcard.tex	Tue Apr 18 21:35:22 2006
@@ -76,8 +76,9 @@
 % \input{gnusref} % % % % % % % % % % % % % % % % % % % % % % % % % %  
 %% include file for the Gnus refcard and booklet
 
-\def\progver{5.10}\def\refver{5.10-2} % program and refcard versions
-\def\date{Mar, 2005}
+\def\progver{5.10} % program version
+% \def\refver{5.10-2} % refcard version (not used)
+\def\date{April, 2006}
 \def\author{Gnus Bugfixing Girls + Boys $<[email protected]$>$}
 
 %%
@@ -1267,10 +1268,6 @@
 % o Gnus Unplugged category-buffer commands need to be written
 
 \begin{document}
-
-\def\progver{5.10}\def\refver{5.10-1} % program and refcard versions
-\def\date{Jan 10th, 2004}
-\def\author{Gnus Bugfixing Girls + Boys $<[email protected]$>$}
 
 \ifthenelse{\isundefined{\booklettrue}}{ % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   \raggedbottom\raggedright
Index: gnus/texi/gnus.texi
diff -u gnus/texi/gnus.texi:7.174 gnus/texi/gnus.texi:7.181
--- gnus/texi/gnus.texi:7.174	Tue Apr 11 16:17:52 2006
+++ gnus/texi/gnus.texi	Sat Apr 22 03:42:18 2006
@@ -816,7 +816,8 @@
 * Moderation::                  What to do if you're a moderator.
 * Image Enhancements::          Modern versions of Emacs/XEmacs can display images.
 * Fuzzy Matching::              What's the big fuzz?
-* Thwarting Email Spam::        A how-to on avoiding unsolicited commercial email.
+* Thwarting Email Spam::        Simple ways to avoid unsolicited commercial email.
+* Spam Package::                A package for filtering and processing spam.
 * Other modes::                 Interaction with other modes.
 * Various Various::             Things that are really various.
 
@@ -835,7 +836,8 @@
 
 * X-Face::                      Display a funky, teensy black-and-white image.
 * Face::                        Display a funkier, teensier colored image.
-* Smileys::                     Show all those happy faces the way they were meant to be shown.
+* Smileys::                     Show all those happy faces the way they were
+                                  meant to be shown.
 * Picons::                      How to display pictures of what you're reading.
 * XVarious::                    Other XEmacsy Gnusey variables.
 
@@ -845,29 +847,19 @@
 * Anti-Spam Basics::            Simple steps to reduce the amount of spam.
 * SpamAssassin::                How to use external anti-spam tools.
 * Hashcash::                    Reduce spam by burning CPU time.
-* Filtering Spam Using The Spam ELisp Package::
-* Filtering Spam Using Statistics with spam-stat::
 
-Filtering Spam Using The Spam ELisp Package
+Spam Package
 
-* Spam ELisp Package Sequence of Events::
-* Spam ELisp Package Filtering of Incoming Mail::
-* Spam ELisp Package Global Variables::
-* Spam ELisp Package Configuration Examples::
-* Blacklists and Whitelists::
-* BBDB Whitelists::
-* Gmane Spam Reporting::
-* Anti-spam Hashcash Payments::
-* Blackholes::
-* Regular Expressions Header Matching::
-* Bogofilter::
-* SpamAssassin back end::
-* ifile spam filtering::
-* spam-stat spam filtering::
-* SpamOracle::
-* Extending the Spam ELisp package::
+* Spam Package Introduction::
+* Filtering Incoming Mail::
+* Detecting Spam in Groups::
+* Spam and Ham Processors::
+* Spam Package Configuration Examples::
+* Spam Back Ends::
+* Extending the Spam package::
+* Spam Statistics Package::
 
-Filtering Spam Using Statistics with spam-stat
+Spam Statistics Package
 
 * Creating a spam-stat dictionary::
 * Splitting mail using spam-stat::
@@ -6520,6 +6512,14 @@
 Insert all old articles in the summary buffer.  If given a numbered
 prefix, fetch this number of articles.
 
+@item / b
+@kindex / b (Summary)
+@findex gnus-summary-limit-to-bodies
+Limit the summary buffer to articles that have bodies that match a
+certain regexp (@code{gnus-summary-limit-to-bodies}).  If given a
+prefix, reverse the limit.  This command is quite slow since it
+requires selecting each article to find the matches.
+
 @end table
 
 
@@ -7020,6 +7020,12 @@
 Make the current article the child of the marked (or previous) article
 (@code{gnus-summary-reparent-thread}).
 
+@item T M-^
+@kindex T M-^ (Summary)
+@findex gnus-summary-reparent-children
+Make the current article the parent of the marked articles
+(@code{gnus-summary-reparent-children}).
+
 @end table
 
 The following commands are thread movement commands.  They all
@@ -10438,6 +10444,18 @@
 Search through all previous (raw) articles for a regexp
 (@code{gnus-summary-search-article-backward}).
 
+@item M-S
+@kindex M-S (Summary)
+@findex gnus-summary-repeat-search-article-forward
+Repeat the previous search forwards
+(@code{gnus-summary-repeat-search-article-forward}).
+
+@item M-R
+@kindex M-R (Summary)
+@findex gnus-summary-repeat-search-article-backward
+Repeat the previous search backwards
+(@code{gnus-summary-repeat-search-article-backward}).
+
 @item &
 @kindex & (Summary)
 @findex gnus-summary-execute-command
@@ -21300,7 +21318,8 @@
 * Fetching a Group::            Starting Gnus just to read a group.
 * Image Enhancements::          Modern versions of Emacs/XEmacs can display images.
 * Fuzzy Matching::              What's the big fuzz?
-* Thwarting Email Spam::        A how-to on avoiding unsolicited commercial email.
+* Thwarting Email Spam::        Simple ways to avoid unsolicited commercial email.
+* Spam Package::                A package for filtering and processing spam.
 * Other modes::                 Interaction with other modes.
 * Various Various::             Things that are really various.
 @end menu
@@ -23016,8 +23035,6 @@
 * Anti-Spam Basics::            Simple steps to reduce the amount of spam.
 * SpamAssassin::                How to use external anti-spam tools.
 * Hashcash::                    Reduce spam by burning CPU time.
-* Filtering Spam Using The Spam ELisp Package::
-* Filtering Spam Using Statistics with spam-stat::
 @end menu
 
 @node The problem of spam
@@ -23336,44 +23353,110 @@
 cookies in incoming mail and filter mail accordingly (@pxref{Anti-spam
 Hashcash Payments}).
 
-@node Filtering Spam Using The Spam ELisp Package
-@subsection Filtering Spam Using The Spam ELisp Package
+@node Spam Package
+@section Spam Package
 @cindex spam filtering
 @cindex spam
 
-The idea behind @code{spam.el} is to have a control center for spam detection
-and filtering in Gnus.  To that end, @code{spam.el} does two things: it
-filters new mail, and it analyzes mail known to be spam or ham.
-@dfn{Ham} is the name used throughout @code{spam.el} to indicate
-non-spam messages.
+The Spam package provides Gnus with a centralized mechanism for
+detecting and filtering spam.  It filters new mail, and processes
+messages according to whether they are spam or ham.  (@dfn{Ham} is the
+name used throughout this manual to indicate non-spam messages.)
+
+@menu
+* Spam Package Introduction::
+* Filtering Incoming Mail::
+* Detecting Spam in Groups::
+* Spam and Ham Processors::
+* Spam Package Configuration Examples::
+* Spam Back Ends::
+* Extending the Spam package::
+* Spam Statistics Package::
+@end menu
+
+@node Spam Package Introduction
+@subsection Spam Package Introduction
+@cindex spam filtering
+@cindex spam filtering sequence of events
+@cindex spam
+
+You must read this section to understand how the Spam package works.
+Do not skip, speed-read, or glance through this section.
 
 Make sure you read the section on the @code{spam.el} sequence of
-events.  See @xref{Spam ELisp Package Sequence of Events}.
+events.  See @xref{Extending the Spam package}.
 
 @cindex spam-initialize
-To use @code{spam.el}, you @strong{must} run the function
-@code{spam-initialize} to autoload @file{spam.el} and to install the
-@code{spam.el} hooks.  There is one exception: if you use the
-@code{spam-use-stat} (@pxref{spam-stat spam filtering}) setting, you
-should turn it on before @code{spam-initialize}:
+@vindex spam-use-stat
+To use the Spam package, you @strong{must} first run the function
+@code{spam-initialize}:
 
 @example
-(setq spam-use-stat t) ;; if needed
 (spam-initialize)
 @end example
 
-So, what happens when you load @file{spam.el}?
-
-First, some hooks will get installed by @code{spam-initialize}.  There
-are some hooks for @code{spam-stat} so it can save its databases, and
-there are hooks so interesting things will happen when you enter and
-leave a group.  More on the sequence of events later (@pxref{Spam
-ELisp Package Sequence of Events}).
-
-You get the following keyboard commands:
+This autoloads @code{spam.el} and installs the various hooks necessary
+to let the Spam package do its job.  In order to make use of the Spam
+package, you have to set up certain group parameters and variables,
+which we will describe below.  All of the variables controlling the
+Spam package can be found in the @samp{spam} customization group.
+
+There are two ``contact points'' between the Spam package and the rest
+of Gnus: checking new mail for spam, and leaving a group.
+
+Checking new mail for spam is done in one of two ways: while splitting
+incoming mail, or when you enter a group.
+
+The first way, checking for spam while splitting incoming mail, is
+suited to mail back ends such as @code{nnml} or @code{nnimap}, where
+new mail appears in a single spool file.  The Spam package processes
+incoming mail, and sends mail considered to be spam to a designated
+``spam'' group.  @xref{Filtering Incoming Mail}.
+
+The second way is suited to back ends such as @code{nntp}, which have
+no incoming mail spool, or back ends where the server is in charge of
+splitting incoming mail.  In this case, when you enter a Gnus group,
+the unseen or unread messages in that group are checked for spam.
+Detected spam messages are marked as spam.  @xref{Detecting Spam in
+Groups}.
+
+@cindex spam back ends
+In either case, you have to tell the Spam package what method to use
+to detect spam messages.  There are several methods, or @dfn{spam back
+ends} (not to be confused with Gnus back ends!) to choose from: spam
+``blacklists'' and ``whitelists'', dictionary-based filters, and so
+forth.  @xref{Spam Back Ends}.
+
+In the Gnus summary buffer, messages that have been identified as spam
+always appear with a @samp{$} symbol.
+
+The Spam package divides Gnus groups into three categories: ham
+groups, spam groups, and unclassified groups.  You should mark each of
+the groups you subscribe to as either a ham group or a spam group,
+using the @code{spam-contents} group parameter (@pxref{Group
+Parameters}).  Spam groups have a special property: when you enter a
+spam group, all unseen articles are marked as spam.  Thus, mail split
+into a spam group is automatically marked as spam.
+
+Identifying spam messages is only half of the Spam package's job.  The
+second half comes into play whenever you exit a group buffer.  At this
+point, the Spam package does several things:
+
+First, it calls @dfn{spam and ham processors} to process the articles
+according to whether they are spam or ham.  There is a pair of spam
+and ham processors associated with each spam back end, and what the
+processors do depends on the back end.  At present, the main role of
+spam and ham processors is for dictionary-based spam filters: they add
+the contents of the messages in the group to the filter's dictionary,
+to improve its ability to detect future spam.  The @code{spam-process}
+group parameter specifies what spam processors to use.  @xref{Spam and
+Ham Processors}.
+
+If the spam filter failed to mark a spam message, you can mark it
+yourself, so that the message is processed as spam when you exit the
+group:
 
 @table @kbd
-
 @item M-d
 @itemx M s x
 @itemx S x
@@ -23381,194 +23464,103 @@
 @kindex S x
 @kindex M s x
 @findex gnus-summary-mark-as-spam
-@code{gnus-summary-mark-as-spam}.
-
-Mark current article as spam, showing it with the @samp{$} mark.
-Whenever you see a spam article, make sure to mark its summary line
-with @kbd{M-d} before leaving the group.  This is done automatically
-for unread articles in @emph{spam} groups.
-
-@item M s t
-@itemx S t
-@kindex M s t
-@kindex S t
-@findex spam-bogofilter-score
-@code{spam-bogofilter-score}.
-
-You must have Bogofilter installed for that command to work properly.
-
-@xref{Bogofilter}.
-
+@findex gnus-summary-mark-as-spam
+Mark current article as spam, showing it with the @samp{$} mark
+(@code{gnus-summary-mark-as-spam}).
 @end table
 
-Also, when you load @file{spam.el}, you will be able to customize its
-variables.  Try @code{customize-group} on the @samp{spam} variable
-group.
+@noindent
+Similarly, you can unmark an article if it has been erroneously marked
+as spam.  @xref{Setting Marks}.
 
-@menu
-* Spam ELisp Package Sequence of Events::
-* Spam ELisp Package Filtering of Incoming Mail::
-* Spam ELisp Package Global Variables::
-* Spam ELisp Package Sorting and Score Display in Summary Buffer::
-* Spam ELisp Package Configuration Examples::
-* Blacklists and Whitelists::
-* BBDB Whitelists::
-* Gmane Spam Reporting::
-* Anti-spam Hashcash Payments::
-* Blackholes::
-* Regular Expressions Header Matching::
-* Bogofilter::
-* SpamAssassin back end::
-* ifile spam filtering::
-* spam-stat spam filtering::
-* SpamOracle::
-* Extending the Spam ELisp package::
-@end menu
+Normally, a ham message found in a non-ham group is not processed as
+ham---the rationale is that it should be moved into a ham group for
+further processing (see below).  However, you can force these articles
+to be processed as ham by setting
+@code{spam-process-ham-in-spam-groups} and
+@code{spam-process-ham-in-nonham-groups}.
 
-@node Spam ELisp Package Sequence of Events
-@subsubsection Spam ELisp Package Sequence of Events
-@cindex spam filtering
-@cindex spam filtering sequence of events
-@cindex spam
-You must read this section to understand how @code{spam.el} works.
-Do not skip, speed-read, or glance through this section.
+@vindex gnus-ham-process-destinations
+@vindex gnus-spam-process-destinations
+The second thing that the Spam package does when you exit a group is
+to move ham articles out of spam groups, and spam articles out of ham
+groups.  Ham in a spam group is moved to the group specified by the
+variable @code{gnus-ham-process-destinations}, or the group parameter
+@code{ham-process-destination}.  Spam in a ham group is moved to the
+group specified by the variable @code{gnus-spam-process-destinations},
+or the group parameter @code{spam-process-destination}.  If these
+variables are not set, the articles are left in their current group.
+If an article cannot not be moved (e.g., with a read-only backend such
+as @acronym{NNTP}), it is copied.
+
+If an article is moved to another group, it is processed again when
+you visit the new group.  Normally, this is not a problem, but if you
+want each article to be processed only once, load the
+@code{gnus-registry.el} package and set the variable
+@code{spam-log-to-registry} to @code{t}.  @xref{Spam Package
+Configuration Examples}.
+
+Normally, spam groups ignore @code{gnus-spam-process-destinations}.
+However, if you set @code{spam-move-spam-nonspam-groups-only} to
+@code{nil}, spam will also be moved out of spam groups, depending on
+the @code{spam-process-destination} parameter.
 
-There are two @emph{contact points}, if you will, between
-@code{spam.el} and the rest of Gnus: checking new mail for spam, and
-leaving a group.
-
-Getting new mail in Gnus is done in one of two ways.  You can either
-split your incoming mail or you can classify new articles as ham or
-spam when you enter the group.
-
-Splitting incoming mail is better suited to mail back ends such as
-@code{nnml} or @code{nnimap} where new mail appears in a single file
-called a @dfn{Spool File}.  See @xref{Spam ELisp Package Filtering of
-Incoming Mail}.
-
-@vindex gnus-spam-autodetect
-@vindex gnus-spam-autodetect-methods
-For back ends such as @code{nntp} there is no incoming mail spool, so
-an alternate mechanism must be used.  This may also happen for
-back ends where the server is in charge of splitting incoming mail, and
-Gnus does not do further splitting.  The @code{spam-autodetect} and
-@code{spam-autodetect-methods} group parameters (accessible with
-@kbd{G c} and @kbd{G p} as usual), and the corresponding variables
-@code{gnus-spam-autodetect} and @code{gnus-spam-autodetect-methods}
-(accessible with @kbd{M-x customize-variable} as usual) can help.
-
-When @code{spam-autodetect} is used (you can turn it on for a
-group/topic or wholesale by regular expression matches, as needed), it
-hooks into the process of entering a group.  Thus, entering a group
-with unseen or unread articles becomes the substitute for checking
-incoming mail.  Whether only unseen articles or all unread articles
-will be processed is determined by the
-@code{spam-autodetect-recheck-messages}.  When set to @code{t}, unread
-messages will be rechecked.  You should probably stick with the
-default of only checking unseen messages.
-
-@code{spam-autodetect} grants the user at once more and less control
-of spam filtering.  The user will have more control over each group's
-spam methods, so for instance the @samp{ding} group may have
-@code{spam-use-BBDB} as the autodetection method, while the
-@samp{suspect} group may have the @code{spam-use-blacklist} and
-@code{spam-use-bogofilter} methods enabled.  Every article detected to
-be spam will be marked with the spam mark @samp{$} and processed on
-exit from the group as normal spam.  The user has less control over
-the @emph{sequence} of checks, as he might with @code{spam-split}.
-
-When the newly split mail goes into groups, or messages are
-autodetected to be ham or spam, those groups must be exited (after
-entering, if needed) for further spam processing to happen.  It
-matters whether the group is considered a ham group, a spam group, or
-is unclassified, based on its @code{spam-content} parameter
-(@pxref{Spam ELisp Package Global Variables}).  Spam groups have the
-additional characteristic that, when entered, any unseen or unread
-articles (depending on the @code{spam-mark-only-unseen-as-spam}
-variable) will be marked as spam.  Thus, mail split into a spam group
-gets automatically marked as spam when you enter the group.
-
-Thus, when you exit a group, the @code{spam-processors} are applied,
-if any are set, and the processed mail is moved to the
-@code{ham-process-destination} or the @code{spam-process-destination}
-depending on the article's classification.  If the
-@code{ham-process-destination} or the @code{spam-process-destination},
-whichever is appropriate, are @code{nil}, the article is left in the
-current group.
-
-If a spam is found in any group (this can be changed to only non-spam
-groups with @code{spam-move-spam-nonspam-groups-only}), it is
-processed by the active @code{spam-processors} (@pxref{Spam ELisp
-Package Global Variables}) when the group is exited.  Furthermore, the
-spam is moved to the @code{spam-process-destination} (@pxref{Spam
-ELisp Package Global Variables}) for further training or deletion.
-You have to load the @code{gnus-registry.el} package and enable the
-@code{spam-log-to-registry} variable if you want spam to be processed
-no more than once.  Thus, spam is detected and processed everywhere,
-which is what most people want.  If the
-@code{spam-process-destination} is @code{nil}, the spam is marked as
+The final thing the Spam package does is to mark spam articles as
 expired, which is usually the right thing to do.
 
-If spam can not be moved---because of a read-only back end such as
-@acronym{NNTP}, for example, it will be copied.
-
-If a ham mail is found in a ham group, as determined by the
-@code{ham-marks} parameter, it is processed as ham by the active ham
-@code{spam-processor} when the group is exited.  With the variables
-@code{spam-process-ham-in-spam-groups} and
-@code{spam-process-ham-in-nonham-groups} the behavior can be further
-altered so ham found anywhere can be processed.  You have to load the
-@code{gnus-registry.el} package and enable the
-@code{spam-log-to-registry} variable if you want ham to be processed
-no more than once.  Thus, ham is detected and processed only when
-necessary, which is what most people want.  More on this in
-@xref{Spam ELisp Package Configuration Examples}.
-
-If ham can not be moved---because of a read-only back end such as
-@acronym{NNTP}, for example, it will be copied.
-
 If all this seems confusing, don't worry.  Soon it will be as natural
 as typing Lisp one-liners on a neural interface@dots{} err, sorry, that's
 50 years in the future yet.  Just trust us, it's not so bad.
 
-@node Spam ELisp Package Filtering of Incoming Mail
-@subsubsection Spam ELisp Package Filtering of Incoming Mail
+@node Filtering Incoming Mail
+@subsection Filtering Incoming Mail
 @cindex spam filtering
 @cindex spam filtering incoming mail
 @cindex spam
 
-To use the @code{spam.el} facilities for incoming mail filtering, you
-must add the following to your fancy split list
-@code{nnmail-split-fancy} or @code{nnimap-split-fancy}:
+To use the Spam package to filter incoming mail, you must first set up
+fancy mail splitting.  @xref{Fancy Mail Splitting}.  The Spam package
+defines a special splitting function that you can add to your fancy
+split variable (either @code{nnmail-split-fancy} or
+@code{nnimap-split-fancy}, depending on your mail back end):
 
 @example
 (: spam-split)
 @end example
 
-Note that the fancy split may be called @code{nnmail-split-fancy} or
-@code{nnimap-split-fancy}, depending on whether you use the nnmail or
-nnimap back ends to retrieve your mail.
-
-Also, @code{spam-split} will not modify incoming mail in any way.
-
-The @code{spam-split} function will process incoming mail and send the
-mail considered to be spam into the group name given by the variable
-@code{spam-split-group}.  By default that group name is @samp{spam},
-but you can customize @code{spam-split-group}.  Make sure the contents
-of @code{spam-split-group} are an @emph{unqualified} group name, for
-instance in an @code{nnimap} server @samp{your-server} the value
-@samp{spam} will turn out to be @samp{nnimap+your-server:spam}.  The
-value @samp{nnimap+server:spam}, therefore, is wrong and will
-actually give you the group
-@samp{nnimap+your-server:nnimap+server:spam} which may or may not
-work depending on your server's tolerance for strange group names.
-
-You can also give @code{spam-split} a parameter,
-e.g. @code{spam-use-regex-headers} or @code{"maybe-spam"}.  Why is
-this useful?
+@vindex spam-split-group
+@noindent
+The @code{spam-split} function scans incoming mail according to your
+chosen spam back end(s), and sends messages identified as spam to a
+spam group.  By default, the spam group is a group named @samp{spam},
+but you can change this by customizing @code{spam-split-group}.  Make
+sure the contents of @code{spam-split-group} are an unqualified group
+name.  For instance, in an @code{nnimap} server @samp{your-server},
+the value @samp{spam} means @samp{nnimap+your-server:spam}.  The value
+@samp{nnimap+server:spam} is therefore wrong---it gives the group
+@samp{nnimap+your-server:nnimap+server:spam}.
 
-Take these split rules (with @code{spam-use-regex-headers} and
-@code{spam-use-blackholes} set):
+@code{spam-split} does not modify the contents of messages in any way.
+
+@vindex nnimap-split-download-body
+Note for IMAP users: if you use the @code{spam-check-bogofilter},
+@code{spam-check-ifile}, and @code{spam-check-stat} spam back ends,
+you should also set set the variable @code{nnimap-split-download-body}
+to @code{t}.  These spam back ends are most useful when they can
+``scan'' the full message body.  By default, the nnimap back end only
+retrieves the message headers; @code{nnimap-split-download-body} tells
+it to retrieve the message bodies as well.  We don't set this by
+default because it will slow @acronym{IMAP} down, and that is not an
+appropriate decision to make on behalf of the user.  @xref{Splitting
+in IMAP}.
+
+You have to specify one or more spam back ends for @code{spam-split}
+to use, by setting the @code{spam-use-*} variables.  @xref{Spam Back
+Ends}.  Normally, @code{spam-split} simply uses all the spam back ends
+you enabled in this way.  However, you can tell @code{spam-split} to
+use only some of them.  Why this is useful?  Suppose you are using the
+@code{spam-use-regex-headers} and @code{spam-use-blackholes} spam back
+ends, and the following split rule:
 
 @example
  nnimap-split-fancy '(|
@@ -23578,21 +23570,23 @@
                       "mail")
 @end example
 
-Now, the problem is that you want all ding messages to make it to the
-ding folder.  But that will let obvious spam (for example, spam
-detected by SpamAssassin, and @code{spam-use-regex-headers}) through,
-when it's sent to the ding list.  On the other hand, some messages to
-the ding list are from a mail server in the blackhole list, so the
-invocation of @code{spam-split} can't be before the ding rule.
-
-You can let SpamAssassin headers supersede ding rules, but all other
-@code{spam-split} rules (including a second invocation of the
-regex-headers check) will be after the ding rule:
+@noindent
+The problem is that you want all ding messages to make it to the ding
+folder.  But that will let obvious spam (for example, spam detected by
+SpamAssassin, and @code{spam-use-regex-headers}) through, when it's
+sent to the ding list.  On the other hand, some messages to the ding
+list are from a mail server in the blackhole list, so the invocation
+of @code{spam-split} can't be before the ding rule.
+
+The solution is to let SpamAssassin headers supersede ding rules, and
+perform the other @code{spam-split} rules (including a second
+invocation of the regex-headers check) after the ding rule.  This is
+done by passing a parameter to @code{spam-split}:
 
 @example
 nnimap-split-fancy
       '(|
-        ;; @r{all spam detected by @code{spam-use-regex-headers} goes to @samp{regex-spam}}
+        ;; @r{spam detected by @code{spam-use-regex-headers} goes to @samp{regex-spam}}
         (: spam-split "regex-spam" 'spam-use-regex-headers)
         (any "ding" "ding")
         ;; @r{all other spam detected by spam-split goes to @code{spam-split-group}}
@@ -23601,55 +23595,68 @@
         "mail")
 @end example
 
+@noindent
 This lets you invoke specific @code{spam-split} checks depending on
-your particular needs, and to target the results of those checks to a
+your particular needs, and target the results of those checks to a
 particular spam group.  You don't have to throw all mail into all the
 spam tests.  Another reason why this is nice is that messages to
 mailing lists you have rules for don't have to have resource-intensive
 blackhole checks performed on them.  You could also specify different
 spam checks for your nnmail split vs. your nnimap split.  Go crazy.
 
-You should still have specific checks such as
-@code{spam-use-regex-headers} set to @code{t}, even if you
-specifically invoke @code{spam-split} with the check.  The reason is
-that when loading @file{spam.el}, some conditional loading is done
-depending on what @code{spam-use-xyz} variables you have set.  This
-is usually not critical, though.
-
-@emph{Note for IMAP users}
-
-The boolean variable @code{nnimap-split-download-body} needs to be
-set, if you want to split based on the whole message instead of just
-the headers.  By default, the nnimap back end will only retrieve the
-message headers.  If you use a @emph{statistical} filter,
-e.g. @code{spam-check-bogofilter}, @code{spam-check-ifile}, or
-@code{spam-check-stat} (the splitters that can benefit from the full
-message body), this variable will be set automatically.  It is not set
-for non-statistical back ends by default because it will slow
-@acronym{IMAP} down.
+You should set the @code{spam-use-*} variables for whatever spam back
+ends you intend to use.  The reason is that when loading
+@file{spam.el}, some conditional loading is done depending on what
+@code{spam-use-xyz} variables you have set.  @xref{Spam Back Ends}.
+
+@c @emph{TODO: spam.el needs to provide a uniform way of training all the
+@c statistical databases.  Some have that functionality built-in, others
+@c don't.}
+
+@node Detecting Spam in Groups
+@subsection Detecting Spam in Groups
+
+To detect spam when visiting a group, set the group's
+@code{spam-autodetect} and @code{spam-autodetect-methods} group
+parameters.  These are accessible with @kbd{G c} or @kbd{G p}, as
+usual (@pxref{Group Parameters}).
+
+You should set the @code{spam-use-*} variables for whatever spam back
+ends you intend to use.  The reason is that when loading
+@file{spam.el}, some conditional loading is done depending on what
+@code{spam-use-xyz} variables you have set.
+
+By default, only unseen articles are processed for spam.  You can
+force Gnus to recheck all messages in the group by setting the
+variable @code{spam-autodetect-recheck-messages} to @code{t}.
+
+If you use the @code{spam-autodetect} method of checking for spam, you
+can specify different spam detection methods for different groups.
+For instance, the @samp{ding} group may have @code{spam-use-BBDB} as
+the autodetection method, while the @samp{suspect} group may have the
+@code{spam-use-blacklist} and @code{spam-use-bogofilter} methods
+enabled.  Unlike with @code{spam-split}, you don't have any control
+over the @emph{sequence} of checks, but this is probably unimportant.
 
-@xref{Splitting in IMAP}.
-
-@node Spam ELisp Package Global Variables
-@subsubsection Spam ELisp Package Global Variables
+@node Spam and Ham Processors
+@subsection Spam and Ham Processors
 @cindex spam filtering
 @cindex spam filtering variables
 @cindex spam variables
 @cindex spam
 
 @vindex gnus-spam-process-newsgroups
-The concepts of ham processors and spam processors are very important.
-Ham processors and spam processors for a group can be set with the
-@code{spam-process} group parameter, or the
-@code{gnus-spam-process-newsgroups} variable.  Ham processors take
-mail known to be non-spam (@emph{ham}) and process it in some way so
-that later similar mail will also be considered non-spam.  Spam
-processors take mail known to be spam and process it so similar spam
-will be detected later.
-
-The format of the spam or ham processor entry used to be a symbol,
-but now it is a @sc{cons} cell.  See the individual spam processor entries
-for more information.
+Spam and ham processors specify special actions to take when you exit
+a group buffer.  Spam processors act on spam messages, and ham
+processors on ham messages.  At present, the main role of these
+processors is to update the dictionaries of dictionary-based spam back
+ends such as Bogofilter (@pxref{Bogofilter}) and the Spam Statistics
+package (@pxref{Spam Statistics Filtering}).
+
+The spam and ham processors that apply to each group are determined by
+the group's@code{spam-process} group parameter.  If this group
+parameter is not defined, they are determined by the variable
+@code{gnus-spam-process-newsgroups}.
 
 @vindex gnus-spam-newsgroup-contents
 Gnus learns from the spam you get.  You have to collect your spam in
@@ -23803,57 +23810,8 @@
 only unseen articles or all unread articles should be checked for
 spam.  It is recommended that you leave it off.
 
-@node Spam ELisp Package Sorting and Score Display in Summary Buffer
-@subsubsection Spam ELisp Package Sorting and Score Display in Summary Buffer
-@cindex spam scoring
-@cindex spam sorting
-@cindex spam score summary buffer
-@cindex spam sort summary buffer
-@cindex spam
-
-You can display the spam score of articles in your summary buffer, and
-you can sort articles by their spam score.
-
-First you need to decide which back end you will be using.  If you use
-the @code{spam-use-spamassassin},
-@code{spam-use-spamassassin-headers}, or @code{spam-use-regex-headers}
-back end, the @code{X-Spam-Status} header will be used.  If you use
-@code{spam-use-bogofilter}, the @code{X-Bogosity} header will be used.
-If you use @code{spam-use-crm114}, any header that matches the CRM114
-score format will be used.  As long as you set the appropriate back end
-variable to t @emph{before} you load @file{spam.el}, you will be
-fine.  @code{spam.el} will automatically add the right header to the
-internal Gnus list of required headers.
-
-To show the spam score in your summary buffer, add this line to your
-@code{gnus.el} file (note @code{spam.el} does not do that by default
-so it won't override any existing @code{S} formats you may have).
-
-@lisp
-(defalias 'gnus-user-format-function-S 'spam-user-format-function-S)
-@end lisp
-
-Now just set your summary line format to use @code{%uS}.  Here's an
-example that formats the spam score in a 5-character field:
-
-@lisp
-(setq gnus-summary-line-format
- "%U%R %10&user-date; $%5uS %6k  %B %(%4L: %*%-25,25a%) %s \n")
-@end lisp
-
-Finally, to sort by spam status, either do it globally:
-
-@lisp
-(setq
- gnus-show-threads nil
- gnus-article-sort-functions
-  '(spam-article-sort-by-spam-status))
-@end lisp
-
-or per group (@pxref{Sorting the Summary Buffer}).
-
-@node Spam ELisp Package Configuration Examples
-@subsubsection Spam ELisp Package Configuration Examples
+@node Spam Package Configuration Examples
+@subsection Spam Package Configuration Examples
 @cindex spam filtering
 @cindex spam filtering configuration examples
 @cindex spam configuration examples
@@ -23978,11 +23936,11 @@
 
 Because of the @code{gnus-group-spam-classification-spam} entry, all
 messages are marked as spam (with @code{$}).  When I find a false
-positive, I mark the message with some other ham mark (@code{ham-marks},
-@ref{Spam ELisp Package Global Variables}).  On group exit, those
-messages are copied to both groups, @samp{INBOX} (where I want to have
-the article) and @samp{training.ham} (for training bogofilter) and
-deleted from the @samp{spam.detected} folder.
+positive, I mark the message with some other ham mark
+(@code{ham-marks}, @ref{Spam and Ham Processors}).  On group exit,
+those messages are copied to both groups, @samp{INBOX} (where I want
+to have the article) and @samp{training.ham} (for training bogofilter)
+and deleted from the @samp{spam.detected} folder.
 
 The @code{gnus-article-sort-by-chars} entry simplifies detection of
 false positives for me.  I receive lots of worms (sweN, @dots{}), that all
@@ -24018,6 +23976,30 @@
 not the same as on news.gmane.org, thus @code{spam-report.el} has to check
 the @code{X-Report-Spam} header to find the correct number.
 
+@node Spam Back Ends
+@subsection Spam Back Ends
+@cindex spam back ends
+
+The spam package offers a variety of back ends for detecting spam.
+Each back end defines a set of methods for detecting spam
+(@pxref{Filtering Incoming Mail}, @pxref{Detecting Spam in Groups}),
+and a pair of spam and ham processors (@pxref{Spam and Ham
+Processors}).
+
+@menu
+* Blacklists and Whitelists::
+* BBDB Whitelists::
+* Gmane Spam Reporting::
+* Anti-spam Hashcash Payments::
+* Blackholes::
+* Regular Expressions Header Matching::
+* Bogofilter::
+* SpamAssassin back end::
+* ifile spam filtering::
+* Spam Statistics Filtering::
+* SpamOracle::
+@end menu
+
 @node Blacklists and Whitelists
 @subsubsection Blacklists and Whitelists
 @cindex spam filtering
@@ -24331,6 +24313,15 @@
 
 @end defvar
 
+@table @kbd
+@item M s t
+@itemx S t
+@kindex M s t
+@kindex S t
+@findex spam-bogofilter-score
+Get the Bogofilter spamicity score (@code{spam-bogofilter-score}).
+@end table
+
 @defvar spam-use-bogofilter-headers
 
 Set this variable if you want @code{spam-split} to use Eric Raymond's
@@ -24412,7 +24403,7 @@
 SpamAssassin headers, set @code{spam-use-spamassassin-headers}
 instead.
 
-You should not enable this is you use
+You should not enable this if you use
 @code{spam-use-spamassassin-headers}.
 
 @end defvar
@@ -24422,7 +24413,7 @@
 Set this variable if your mail is preprocessed by SpamAssassin and
 want @code{spam-split} to split based on the SpamAssassin headers.
 
-You should not enable this is you use @code{spam-use-spamassassin}.
+You should not enable this if you use @code{spam-use-spamassassin}.
 
 @end defvar
 
@@ -24484,20 +24475,21 @@
 should be used.  The 1.2.1 version of ifile was used to test this
 functionality.
 
-@node spam-stat spam filtering
-@subsubsection spam-stat spam filtering
+@node Spam Statistics Filtering
+@subsubsection Spam Statistics Filtering
 @cindex spam filtering
 @cindex spam-stat, spam filtering
 @cindex spam-stat
 @cindex spam
 
-@xref{Filtering Spam Using Statistics with spam-stat}.
+This back end uses the Spam Statistics Emacs Lisp package to perform
+statistics-based filtering (@pxref{Spam Statistics Package}).  Before
+using this, you may want to perform some additional steps to
+initialize your Spam Statistics dictionary.  @xref{Creating a
+spam-stat dictionary}.
 
 @defvar spam-use-stat
 
-Enable this variable if you want @code{spam-split} to use
-spam-stat.el, an Emacs Lisp statistical analyzer.
-
 @end defvar
 
 @defvar gnus-group-spam-exit-processor-stat
@@ -24556,18 +24548,17 @@
 @xref{Mail Source Specifiers}, (@pxref{SpamAssassin}).  This method has
 the advantage that the user can see the @emph{X-Spam} headers.
 
-The easiest method is to make @code{spam.el} (@pxref{Filtering Spam
-Using The Spam ELisp Package}) call SpamOracle.
+The easiest method is to make @file{spam.el} (@pxref{Spam Package})
+call SpamOracle.
 
 @vindex spam-use-spamoracle
 To enable SpamOracle usage by @code{spam.el}, set the variable
 @code{spam-use-spamoracle} to @code{t} and configure the
-@code{nnmail-split-fancy} or @code{nnimap-split-fancy} as described in
-the section @xref{Filtering Spam Using The Spam ELisp Package}.  In
-this example the @samp{INBOX} of an nnimap server is filtered using
-SpamOracle.  Mails recognized as spam mails will be moved to
-@code{spam-split-group}, @samp{Junk} in this case.  Ham messages stay
-in @samp{INBOX}:
+@code{nnmail-split-fancy} or @code{nnimap-split-fancy}.  @xref{Spam
+Package}.  In this example the @samp{INBOX} of an nnimap server is
+filtered using SpamOracle.  Mails recognized as spam mails will be
+moved to @code{spam-split-group}, @samp{Junk} in this case.  Ham
+messages stay in @samp{INBOX}:
 
 @example
 (setq spam-use-spamoracle t
@@ -24599,14 +24590,14 @@
 
 SpamOracle employs a statistical algorithm to determine whether a
 message is spam or ham.  In order to get good results, meaning few
-false hits or misses, SpamOracle needs training.  SpamOracle learns the
-characteristics of your spam mails.  Using the @emph{add} mode
+false hits or misses, SpamOracle needs training.  SpamOracle learns
+the characteristics of your spam mails.  Using the @emph{add} mode
 (training mode) one has to feed good (ham) and spam mails to
-SpamOracle.  This can be done by pressing @kbd{|} in the Summary buffer
-and pipe the mail to a SpamOracle process or using @code{spam.el}'s
-spam- and ham-processors, which is much more convenient.  For a
-detailed description of spam- and ham-processors, @xref{Filtering Spam
-Using The Spam ELisp Package}.
+SpamOracle.  This can be done by pressing @kbd{|} in the Summary
+buffer and pipe the mail to a SpamOracle process or using
+@file{spam.el}'s spam- and ham-processors, which is much more
+convenient.  For a detailed description of spam- and ham-processors,
+@xref{Spam Package}.
 
 @defvar gnus-group-spam-exit-processor-spamoracle
 Add this symbol to a group's @code{spam-process} parameter by
@@ -24654,8 +24645,8 @@
 processed by SpamOracle.  The processor sends the messages to
 SpamOracle as new samples for spam.
 
-@node Extending the Spam ELisp package
-@subsubsection Extending the Spam ELisp package
+@node Extending the Spam package
+@subsection Extending the Spam package
 @cindex spam filtering
 @cindex spam elisp package, extending
 @cindex extending the spam elisp package
@@ -24796,9 +24787,8 @@
 
 @end enumerate
 
-
-@node Filtering Spam Using Statistics with spam-stat
-@subsection Filtering Spam Using Statistics with spam-stat
+@node Spam Statistics Package
+@subsection Spam Statistics Package
 @cindex Paul Graham
 @cindex Graham, Paul
 @cindex naive Bayesian spam filtering
@@ -24825,7 +24815,11 @@
 probability of the mail being spam.  If this probability is higher
 than a certain threshold, the mail is considered to be spam.
 
-Gnus supports this kind of filtering.  But it needs some setting up.
+The Spam Statistics package adds support to Gnus for this kind of
+filtering.  It can be used as one of the back ends of the Spam package
+(@pxref{Spam Package}), or by itself.
+
+Before using the Spam Statistics package, you need to set it up.
 First, you need two collections of your mail, one with spam, one with
 non-spam.  Then you need to create a dictionary using these two
 collections, and save it.  And last but not least, you need to use
@@ -24911,8 +24905,10 @@
 @node Splitting mail using spam-stat
 @subsubsection Splitting mail using spam-stat
 
-In order to use @code{spam-stat} to split your mail, you need to add the
-following to your @file{~/.gnus.el} file:
+This section describes how to use the Spam statistics
+@emph{independently} of the @xref{Spam Package}.
+
+First, add the following to your @file{~/.gnus.el} file:
 
 @lisp
 (require 'spam-stat)
@@ -25566,7 +25562,8 @@
 
 This Gnus version will absolutely not work on any Emacsen older than
 that.  Not reliably, at least.  Older versions of Gnus may work on older
-Emacs versions.
+Emacs versions.  Particularly, Gnus 5.10.8 should also work on Emacs
+20.7 and XEmacs 21.1.
 
 There are some vague differences between Gnus on the various
 platforms---XEmacs features more graphics (a logo and a toolbar)---but
Index: gnus/texi/message.texi
diff -u gnus/texi/message.texi:7.33 gnus/texi/message.texi:7.35
--- gnus/texi/message.texi:7.33	Tue Apr  4 23:29:18 2006
+++ gnus/texi/message.texi	Fri Apr 14 17:44:42 2006
@@ -1194,11 +1194,13 @@
 @section Mail Aliases
 @cindex mail aliases
 @cindex aliases
+@cindex completion
+@cindex ecomplete
 
 @vindex message-mail-alias-type
 The @code{message-mail-alias-type} variable controls what type of mail
-alias expansion to use.  Currently only one form is supported---Message
-uses @code{mailabbrev} to handle mail aliases.  If this variable is
+alias expansion to use.  Currently two forms are supported:
+@code{mailabbrev} and @code{ecomplete}.  If this variable is
 @code{nil}, no mail alias expansion will be performed.
 
 @code{mailabbrev} works by parsing the @file{/etc/mailrc} and
@@ -1216,6 +1218,14 @@
 No expansion will be performed upon sending of the message---all
 expansions have to be done explicitly.
 
+If you're using @code{ecomplete}, all addresses from @code{To} and
+@code{Cc} headers will automatically be put into the
+@file{~/.ecompleterc} file.  When you enter text in the @code{To} and
+@code{Cc} headers, @code{ecomplete} will check out the values stored
+there and ``electrically'' say what completions are possible.  To
+choose one of these completions, use the @kbd{M-n} command to move
+down to the list.  Use @kbd{M-n} and @kbd{M-p} to move down and up the
+list, and @kbd{RET} to choose a completion.
 
 @node Spelling
 @section Spelling
Index: gnus/texi/pgg.texi
diff -u gnus/texi/pgg.texi:7.12 gnus/texi/pgg.texi:7.13
--- gnus/texi/pgg.texi:7.12	Mon Mar 27 19:02:08 2006
+++ gnus/texi/pgg.texi	Thu Apr 27 00:27:14 2006
@@ -234,6 +234,14 @@
 Elapsed time for expiration in seconds.
 @end defvar
 
+@defvar pgg-gpg-use-agent
+When using GnuPG (gpg) as PGP scheme you can use @code{gpg-agent} for
+caching@footnote{Actually @code{gpg-agent} does not cache passphrases
+but private keys.  On the other hand, from a users point of view this
+technical difference isn't visible.}.  If non-@code{nil} try to use a
+running @code{gpg-agent}.  It defaults to @code{nil}.
+@end defvar
+
 @node Default user identity
 @section Default user identity
 
Index: gnus/texi/sieve.texi
diff -u gnus/texi/sieve.texi:7.8 gnus/texi/sieve.texi:7.9
--- gnus/texi/sieve.texi:7.8	Mon Mar 27 19:02:08 2006
+++ gnus/texi/sieve.texi	Tue Apr 18 19:30:16 2006
@@ -235,9 +235,9 @@
 @}
 @end example
 
-A few mailing lists do not use the @samp{Sender:} header, but does
-contain some unique identifier in some other header.  The following is
-not a complete script, it assumes that @code{fileinto} has already been
+A few mailing lists do not use the @samp{Sender:} header, but has a
+unique identifier in some other header.  The following is not a
+complete script, it assumes that @code{fileinto} has already been
 required.
 
 @example