Patches between 0.8 and 0.10

Lars Magne Ingebrigtsen <[email protected]> Thu, 01 May 2008 23:54:42 +0200
Newsgroups gmane.emacs.gnus.patches
Message-ID <[email protected]>
Index: gnus/ChangeLog
diff -u gnus/ChangeLog:7.115 gnus/ChangeLog:7.117
--- gnus/ChangeLog:7.115	Thu Apr 10 20:55:44 2008
+++ gnus/ChangeLog	Mon Apr 21 01:38:57 2008
@@ -1,3 +1,13 @@
+2008-04-12  Reiner Steib  <[email protected]>
+
+	* Makefile.in (release-check-settings): Clarify codename.
+	(release-help): New target.
+	(release-cvs-export): Add umask.  Suggested by Sven Joachim.
+
+2008-04-11  Reiner Steib  <[email protected]>
+
+	* README: Bump version to 0.9.
+
 2008-04-10  Reiner Steib  <[email protected]>
 
 	* README: No Gnus v0.8 is released.
Index: gnus/Makefile.in
diff -u gnus/Makefile.in:7.33 gnus/Makefile.in:7.34
--- gnus/Makefile.in:7.33	Sat Mar 29 12:49:19 2008
+++ gnus/Makefile.in	Mon Apr 21 01:38:57 2008
@@ -40,12 +40,6 @@
 TAG  = v5-10
 #
 COMMIT_STRING = $(CODENAME)Gnus v$(VERSION) is released.
-#
-# Procedure:
-# - release-bump-version
-# - release-commit
-# - release-files or release-files-signed
-#
 # # # # # # # # # # End of release variables
 
 all: lick info
@@ -112,11 +106,13 @@
 	@echo "COMMITTER = '$(COMMITTER)'"
 	@echo "  (example: 'Foo Bar  <[email protected]>')"
 	@echo "VERSION   = '$(VERSION)' (example: '5.10.6')"
-	@echo "CODENAME  = '$(CODENAME)' (example: 'No ')"
-	@echo "CIN       = '$(CIN)' (example: 'n', codename initial)"
 	@echo "TAG       = '$(TAG)' (example: 'v5-10-6')"
 	@echo "OLD_TAG   = '$(OLD_TAG)' (example: 'v5-10-5')"
 	@echo
+	@echo "# Only for development versions:"
+	@echo "CODENAME  = '$(CODENAME)' (example: 'No ')"
+	@echo "CIN       = '$(CIN)' (example: 'n', codename initial)"
+	@echo
 	@if [ x"$(VERSION)" = x ]; then echo "error: No VERSION given."; exit 1; else :; fi
 	@if [ x"$(TAG)" = x ]; then echo "error: No TAG given."; exit 1; else :; fi
 	@echo
@@ -128,6 +124,34 @@
 	@echo   release-commit
 	@echo   release-files or release-files-signed
 
+release-help:
+	@echo "Available targets for releases:"
+	@echo
+	@echo "[0]  release-help"
+	@echo "         Display this help message."
+	@echo
+	@echo "[1]  release-check-settings"
+	@echo "         Check it all required variables are specified on the command line."
+	@echo "         Run this target to display the variable names and current values."
+	@echo
+	@echo "[2]  release-bump-version"
+	@echo "         Bump the version to VERSION"
+	@echo
+	@echo "[3]  release-add-changelog"
+	@echo "         Add COMMITTER and COMMIT_STRING to the ChangeLogs."
+	@echo
+	@echo "[4]  release-commit"
+	@echo "         Commit the ChangeLogs and tag repository with TAG."
+	@echo
+	@echo "[5]  release-files or release-files-signed"
+	@echo "         Create the release tar-ball and diff file."
+	@echo "         release-files-signed creates detached GPG signature files as well."
+	@echo
+	@echo "For a release, steps [1]-[5] need to be done.  Immediately after"
+	@echo "the release, we bump the version again by performing steps [1]-[4]"
+	@echo "with the next VERSION and TAG."
+	@echo
+
 bump-version:
 	$(MAKE) COMMIT_STRING='Bump version to $(VERSION).' release-bump-version
 
@@ -237,7 +261,7 @@
 
 release-cvs-export $(CIN)gnus-$(VERSION):	release-check-settings
 	rm -fr $(CIN)gnus-$(VERSION)
-	cvs export -d $(CIN)gnus-$(VERSION) -r $(TAG) gnus
+	umask 0022; cvs export -d $(CIN)gnus-$(VERSION) -r $(TAG) gnus
 
 release-make-tar-ball:	$(CIN)gnus-$(VERSION)
 	[ -d $(CIN)gnus-$(VERSION) ] && cd $(CIN)gnus-$(VERSION) && \
Index: gnus/README
diff -u gnus/README:7.9 gnus/README:7.10
--- gnus/README:7.9	Thu Apr 10 20:55:44 2008
+++ gnus/README	Fri Apr 11 08:39:27 2008
@@ -19,7 +19,7 @@
 Then you have to tell Emacs where Gnus is.  You might put something
 like
 
-   (setq load-path (cons (expand-file-name "~/ngnus-0.8/lisp") load-path))
+   (setq load-path (cons (expand-file-name "~/ngnus-0.9/lisp") load-path))
    (require 'gnus-load)
 
 in your .emacs file, or wherever you keep such things.  
@@ -28,8 +28,8 @@
 
   (require 'info)
   (if (featurep 'xemacs)
-      (add-to-list 'Info-directory-list "~/ngnus-0.8/texi/")
-    (add-to-list 'Info-default-directory-list "~/ngnus-0.8/texi/"))
+      (add-to-list 'Info-directory-list "~/ngnus-0.9/texi/")
+    (add-to-list 'Info-default-directory-list "~/ngnus-0.9/texi/"))
 
 No Gnus does absolutely not work with anything older than Emacs 21.1 or
 XEmacs 21.4.
Index: gnus/contrib/ChangeLog
diff -u gnus/contrib/ChangeLog:7.55 gnus/contrib/ChangeLog:7.70
--- gnus/contrib/ChangeLog:7.55	Wed Feb  6 23:08:36 2008
+++ gnus/contrib/ChangeLog	Thu Apr 24 19:56:10 2008
@@ -1,3 +1,71 @@
+2008-04-24  Christoph Conrad <[email protected]>
+
+	* nnir.el: Fix byte compiler warnings.
+	(nnir-retrieve-headers): Don't set let-bound vars to nil.  Replace
+	mapcar called for effect with mapc.
+	(nnir-compose-result): Bind `group'.  Don't set let-bound vars to nil.
+	(nnir-run-imap, nnir-artlist-groups): Replace mapcar called for effect
+	with mapc.
+	(nnir-run-swish++, nnir-run-swish-e, nnir-run-namazu): Don't set
+	let-bound vars to nil.
+
+2008-04-21  Reiner Steib  <[email protected]>
+
+	* nnir.el: Don't require cl at runtime.  Require gnus-util at runtime.
+	Autoload nnimap and imap functions.
+
+2008-04-21  Justus Piater  <[email protected]>
+
+	* nnir.el (nnir-compose-result): Use `gnus-replace-in-string' instead
+	of `substitute' to avoid using cl at runtime.
+
+2008-04-19  Reiner Steib  <[email protected]>
+
+	* nnir.el: Don't require edmacro anymore.  Remove bogus Emacs 19
+	compatibility code for `kbd'.  Replace `string-to-int' with
+	`string-to-number'.
+	(nnmaildir-base-name-to-article-number): Autoload.
+	(nnir-compose-result): Simplify the code.
+
+2008-04-19  Justus Piater  <[email protected]>
+
+	* nnir.el (nnir-add-result): New helper macro.
+	(nnir-compose-result): Use it.  Fix inexistent file check for maildir.
+
+2008-04-15  Christoph Conrad <[email protected]>
+
+	* nnir.el (nnir-run-swish++): Fix inexistent file check for nnml.
+
+2008-04-15  Reiner Steib  <[email protected]>
+
+	* nnir.el (nnir-run-swish++): Fix typo in doc string.  Move comment on
+	nnml-use-compressed-files to more suitable place.
+
+2008-04-13  Daniel Pittman  <[email protected]>
+
+	* nnir.el (nnir-run-imap): Add doc string.  Use `nnir-imap-make-query'.
+	(nnir-imap-make-query, nnir-imap-query-to-imap)
+	(nnir-imap-expr-to-imap, nnir-imap-parse-query, nnir-imap-next-expr)
+	(nnir-imap-peek-symbol, nnir-imap-next-symbol)
+	(nnir-imap-delimited-string, nnir-imap-end-of-input): New functions.
+	Implement a query language for IMAP search, parse that and compose the
+	back-end query from it.  This allows searches with AND, OR and fixed
+	strings, not just a single substring.
+
+2008-04-13  Reiner Steib  <[email protected]>
+
+	* nnir.el: Add assignment status.
+	(nnir-group-mode-hook): Remove XEmacs 19 compatibility code.
+
+2008-04-13  Justus Piater  <[email protected]>
+
+	* nnir.el (nnir-run-swish++): Suppress non-existing files.
+	(nnir-group-server): For native groups, obtain the server name from
+	gnus-select-method.
+	(nnir-run-swish++, nnir-run-namazu): Support nnmaildir.
+	(nnir-compose-result): New function unifying some code formerly
+	duplicated between nnir-run-swish++ and nnir-run-namazu.
+
 2008-02-06  Reiner Steib  <[email protected]>
 
 	* README: Clarify relevant Emacs versions for sendmail.el and
@@ -103,7 +171,7 @@
 
 2006-07-17  Sascha Wilde  <[email protected]>
 
-	* nnir.el: Removed support for non free backends glimpse and excite.
+g	* nnir.el: Removed support for non free backends glimpse and excite.
 	Changed and updated copyright to Free Software Foundation.  Moved all
 	authors to head.
 
@@ -234,14 +302,15 @@
 
 2004-04-05  Reiner Steib  <[email protected]>
 
+	* nnir.el (nnir-group-server): Fix doc-string, indent.
+
+2004-04-05  Andreas Schwab  <[email protected]>
+
 	* nnir.el (nnir-group-server): Move before first use.
-	From Andreas Schwab  <[email protected]>.
-	Fix doc-string, indent.
 
-2004-03-15  Reiner Steib  <[email protected]>
+2004-03-15  Adrian Lanz  <[email protected]>  (tiny change)
 
-	* nnir.el (nnir-run-swish-e): Fixed typo.  From Adrian Lanz
-	<[email protected]> (tiny change).
+	* nnir.el (nnir-run-swish-e): Fixed typo.
 
 2004-01-23  Jesper Harder  <[email protected]>
 
@@ -264,8 +333,7 @@
 
 	* nnir.el: Autoload `read-kbd-macro' at compile time.
 
-2003-09-30  Kai Grossjohann  <[email protected]>
-	From Torsten Hilbrich <[email protected]>.
+2003-09-30  Torsten Hilbrich <[email protected]>
 
 	* nnir.el (nnir-imap-search-field, nnir-imap-search-arguments)
 	(nnir-imap-search-argument-history): New variables.
Index: gnus/contrib/nnir.el
diff -u gnus/contrib/nnir.el:7.22 gnus/contrib/nnir.el:7.31
--- gnus/contrib/nnir.el:7.22	Thu Oct  4 20:51:27 2007
+++ gnus/contrib/nnir.el	Thu Apr 24 19:43:12 2008
@@ -1,12 +1,41 @@
 ;;; nnir.el --- search mail with various search engines -*- coding: iso-8859-1 -*-
 
 ;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-;;   2005, 2006, 2007 Free Software Foundation, Inc.
+;;   2005, 2006, 2007, 2008 Free Software Foundation, Inc.
 
 ;; Author: Kai Großjohann <[email protected]>
-;; Swish-e and Swish++ backends by: 
+;; Swish-e and Swish++ backends by:
 ;;   Christoph Conrad <[email protected]>.
-;; Imap backend by: Simon Josefsson <[email protected]>.
+;; IMAP backend by: Simon Josefsson <[email protected]>.
+;; IMAP search by: Torsten Hilbrich <torsten.hilbrich <at> gmx.net>
+;; IMAP search improved by Daniel Pittman  <[email protected]>.
+;; nnmaildir support for Swish++ and Namazu backends by:
+;;   Justus Piater <Justus <at> Piater.name>
+
+;; FIXME: This file should be move to ../lisp/ after all copyright assignments
+;; are on file.  As of 2008-04-13, we don't have an assignment/disclaimer from
+;; Torsten Hilbrich, but he's willing to sign.  I've sent hmm the form.
+;; -- rsteib
+
+;; TODO: Documentation in the Gnus manual
+
+;; From: Reiner Steib
+;; Subject: Re: Including nnir.el
+;; Newsgroups: gmane.emacs.gnus.general
+;; Message-ID: <[email protected]>
+;; Date: 2006-06-05 22:49:01 GMT
+;;
+;; On Sun, Jun 04 2006, Sascha Wilde wrote:
+;;
+;; > The one thing most hackers like to forget: Documentation.  By now the
+;; > documentation is only in the comments at the head of the source, I
+;; > would use it as basis to cook up some minimal texinfo docs.
+;; >
+;; > Where in the existing gnus manual would this fit best?
+
+;; Maybe (info "(gnus)Combined Groups") for a general description.
+;; `gnus-group-make-nnir-group' might be described in (info
+;; "(gnus)Foreign Groups") as well.
 
 ;; Keywords: news mail searching ir
 
@@ -309,16 +338,13 @@
 
 ;;; Setup Code:
 
-(require 'cl)
 (require 'nnoo)
 (require 'gnus-group)
 (require 'gnus-sum)
 (require 'message)
+(require 'gnus-util)
 (eval-and-compile
-  (require 'gnus-util))
-(eval-when-compile
-  (require 'nnimap)
-  (autoload 'read-kbd-macro "edmacro" nil t))
+  (require 'cl))
 
 (nnoo-declare nnir)
 (nnoo-define-basics nnir)
@@ -639,17 +665,13 @@
            gnus-current-window-configuration)
      nil)))
 
-;; Emacs 19 compatibility?
-(or (fboundp 'kbd) (defalias 'kbd 'read-kbd-macro))
-
 (defun nnir-group-mode-hook ()
-  (define-key gnus-group-mode-map
-    (if (fboundp 'read-kbd-macro)
-        (kbd "G G")
-      "GG")                             ; XEmacs 19 compat
+  (define-key gnus-group-mode-map (kbd "G G")
     'gnus-group-make-nnir-group))
 (add-hook 'gnus-group-mode-hook 'nnir-group-mode-hook)
 
+;; Why is this needed? Is this for compatibility with old/new gnusae? Using
+;; gnus-group-server instead works for me.  -- Justus Piater
 (defmacro nnir-group-server (group)
   "Return the server for a newsgroup GROUP.
 The returned format is as `gnus-server-to-method' needs it.  See
@@ -661,7 +683,7 @@
 	   (if (string-match "^\\([^+]+\\)\\+\\(.+\\)$" gname)
 	       (format "%s:%s" (match-string 1 gname) (match-string 2 gname))
 	     (concat gname ":")))
-       "native")))
+       (format "%s:%s" (car gnus-select-method) (cadr gnus-select-method)))))
 
 ;; Summary mode commands.
 
@@ -738,15 +760,8 @@
 (deffoo nnir-retrieve-headers (articles &optional group server fetch-old)
   (save-excursion
     (let ((artlist (copy-sequence articles))
-          (art nil)
-          (artitem nil)
-          (artgroup nil) (artno nil)
-          (artrsv nil)
-          (artfullgroup nil)
-          (novitem nil)
-          (novdata nil)
-          (foo nil)
-	  server)
+          art artitem artgroup artno artrsv artfullgroup
+          novitem novdata foo server)
       (while (not (null artlist))
         (setq art (car artlist))
         (or (numberp art)
@@ -800,7 +815,7 @@
         (setq artlist (cdr artlist)))
       (setq novdata (nreverse novdata))
       (set-buffer nntp-server-buffer) (erase-buffer)
-      (mapcar 'nnheader-insert-nov novdata)
+      (mapc 'nnheader-insert-nov novdata)
       'nov)))
 
 (deffoo nnir-request-article (article
@@ -830,6 +845,45 @@
 
 (nnoo-define-skeleton nnir)
 
+
+(defmacro nnir-add-result (dirnam artno score prefix server artlist)
+  "Ask `nnir-compose-result' to construct a result vector, 
+and if it is non-nil, add it to artlist."
+  `(let ((result (nnir-compose-result dirnam artno score prefix server)))
+     (when (not (null result))
+       (push result artlist))))
+
+(autoload 'nnmaildir-base-name-to-article-number "nnmaildir")
+
+;; Helper function currently used by the Swish++ and Namazu backends;
+;; perhaps useful for other backends as well
+(defun nnir-compose-result (dirnam article score prefix server)
+  "Extract the group from dirnam, and create a result vector
+ready to be added to the list of search results."
+
+  ;; remove nnir-*-remove-prefix from beginning of dirnam filename
+  (when (string-match (concat "^" prefix) dirnam)
+    (setq dirnam (replace-match "" t t dirnam)))
+
+  (when (file-readable-p (concat prefix dirnam article))
+    ;; remove trailing slash and, for nnmaildir, cur/new/tmp
+    (setq dirnam
+	  (substring dirnam 0 (if (string= server "nnmaildir:") -5 -1)))
+
+    ;; Set group to dirnam without any leading dots or slashes,
+    ;; and with all subsequent slashes replaced by dots
+    (let ((group (gnus-replace-in-string
+                 (gnus-replace-in-string dirnam "^[./\\]" "" t)
+                 "[/\\]" "." t)))
+
+    (vector (nnir-group-full-name group server)
+	    (if (string= server "nnmaildir:")
+		(nnmaildir-base-name-to-article-number
+		 (substring article 0 (string-match ":" article))
+		 group nil)
+	      (string-to-number article))
+	    (string-to-number score)))))
+
 ;;; Search Engine Interfaces:
 
 ;; freeWAIS-sf interface.
@@ -841,8 +895,7 @@
   (save-excursion
     (let ((qstring (cdr (assq 'query query)))
 	  (prefix (nnir-read-server-parm 'nnir-wais-remove-prefix server))
-          (artlist nil)
-          (score nil) (artno nil) (dirnam nil) (group nil))
+          artlist score artno dirnam group)
       (set-buffer (get-buffer-create nnir-tmp-buffer))
       (erase-buffer)
       (message "Doing WAIS query %s..." query)
@@ -867,8 +920,8 @@
                            dirnam prefix))
         (setq group (substitute ?. ?/ (replace-match "" t t dirnam)))
         (push (vector (nnir-group-full-name group server)
-                      (string-to-int artno)
-                      (string-to-int score))
+                      (string-to-number artno)
+                      (string-to-number score))
               artlist))
       (message "Massaging waissearch output...done")
       (apply 'vector
@@ -885,9 +938,15 @@
 ;; send queries as literals
 ;; handle errors
 
+(autoload 'nnimap-open-server "nnimap")
+(autoload 'imap-mailbox-select "imap")
+(autoload 'imap-search "imap")
+(autoload 'imap-quote-specials "imap")
+
 (defun nnir-run-imap (query srv &optional group-option)
-  (require 'imap)
-  (require 'nnimap)
+  "Run a search against an IMAP back-end server.
+This uses a custom query language parser; see `nnir-imap-make-query' for
+details on the language and supported extensions"
   (save-excursion
     (let ((qstring (cdr (assq 'query query)))
 	  (server (cadr (gnus-server-to-method srv)))
@@ -904,16 +963,187 @@
             (let ((arts 0)
                   (mbx (gnus-group-real-name group)))
               (when (imap-mailbox-select mbx nil buf)
-                (mapcar
+                (mapc
                  (lambda (artnum)
                    (push (vector group artnum 1) artlist)
                    (setq arts (1+ arts)))
-                 (imap-search (concat criteria " \"" qstring "\"") buf))
+                 (imap-search (nnir-imap-make-query criteria qstring) buf))
                 (message "Searching %s... %d matches" mbx arts)))
             (message "Searching %s...done" group))
         (quit nil))
       (reverse artlist))))
 
+(defun nnir-imap-make-query (criteria qstring)
+  "Parse the query string and criteria into an appropriate IMAP search
+expression, returning the string query to make.
+
+This implements a little language designed to return the expected results
+to an arbitrary query string to the end user.
+
+The search is always case-insensitive, as defined by RFC2060, and supports
+the following features (inspired by the Google search input language): 
+
+Automatic \"and\" queries
+    If you specify multiple words then they will be treated as an \"and\"
+    expression intended to match all components.
+
+Phrase searches
+    If you wrap your query in double-quotes then it will be treated as a
+    literal string.
+
+Negative terms
+    If you precede a term with \"-\" then it will negate that.
+
+\"OR\" queries
+    If you include an upper-case \"OR\" in your search it will cause the
+    term before it and the term after it to be treated as alternatives.
+
+In future the following will be added to the language:
+ * support for date matches
+ * support for location of text matching within the query
+ * from/to/etc headers
+ * additional search terms
+ * flag based searching
+ * anything else that the RFC supports, basically."
+  ;; Walk through the query and turn it into an IMAP query string.
+  (nnir-imap-query-to-imap criteria (nnir-imap-parse-query qstring)))
+
+
+(defun nnir-imap-query-to-imap (criteria query)
+  "Turn a s-expression format query into IMAP."
+  (mapconcat
+   ;; Turn the expressions into IMAP text
+   (lambda (item)
+     (nnir-imap-expr-to-imap criteria item))
+   ;; The query, already in s-expr format.
+   query
+   ;; Append a space between each expression
+   " "))
+
+
+(defun nnir-imap-expr-to-imap (criteria expr)
+  "Convert EXPR into an IMAP search expression on CRITERIA"
+  ;; What sort of expression is this, eh?
+  (cond
+   ;; Simple string term
+   ((stringp expr)
+    (format "%s \"%s\"" criteria (imap-quote-specials expr)))
+   ;; Trivial term: and
+   ((eq expr 'and) nil)
+   ;; Composite term: or expression
+   ((eq (car-safe expr) 'or)
+    (format "OR %s %s"
+	    (nnir-imap-expr-to-imap criteria (second expr))
+	    (nnir-imap-expr-to-imap criteria (third expr))))
+   ;; Composite term: just the fax, mam
+   ((eq (car-safe expr) 'not)
+    (format "NOT (%s)" (nnir-imap-query-to-imap criteria (rest expr))))
+   ;; Composite term: just expand it all.
+   ((and (not (null expr)) (listp expr))
+    (format "(%s)" (nnir-imap-query-to-imap criteria expr)))
+   ;; Complex value, give up for now.
+   (t (error "Unhandled input: %S" expr))))
+
+
+(defun nnir-imap-parse-query (string)
+  "Turn STRING into an s-expression based query based on the IMAP
+query language as defined in `nnir-imap-make-query'.
+
+This involves turning individual tokens into higher level terms
+that the search language can then understand and use."
+  (with-temp-buffer
+    ;; Set up the parsing environment.
+    (insert string)
+    (goto-char (point-min))
+    ;; Now, collect the output terms and return them.
+    (let (out)
+      (while (not (nnir-imap-end-of-input))
+	(push (nnir-imap-next-expr) out))
+      (reverse out))))
+
+
+(defun nnir-imap-next-expr (&optional count)
+  "Return the next expression from the current buffer."
+  (let ((term (nnir-imap-next-term count))
+	(next (nnir-imap-peek-symbol)))
+    ;; Are we looking at an 'or' expression?
+    (cond
+     ;; Handle 'expr or expr'
+     ((eq next 'or)
+      (list 'or term (nnir-imap-next-expr 2)))
+     ;; Anything else
+     (t term))))
+
+
+(defun nnir-imap-next-term (&optional count)
+  "Return the next TERM from the current buffer."
+  (let ((term (nnir-imap-next-symbol count)))
+    ;; What sort of term is this?
+    (cond
+     ;; and -- just ignore it
+     ((eq term 'and) 'and)
+     ;; negated term
+     ((eq term 'not) (list 'not (nnir-imap-next-expr)))
+     ;; generic term
+     (t term))))
+
+
+(defun nnir-imap-peek-symbol ()
+  "Return the next symbol from the current buffer, but don't consume it."
+  (save-excursion
+    (nnir-imap-next-symbol)))
+
+(defun nnir-imap-next-symbol (&optional count)
+  "Return the next symbol from the current buffer, or nil if we are
+at the end of the buffer.  If supplied COUNT skips some symbols before
+returning the one at the supplied position."
+  (when (and (numberp count) (> count 1))
+    (nnir-imap-next-symbol (1- count)))
+  (let ((case-fold-search t))
+    ;; end of input stream?
+    (unless (nnir-imap-end-of-input)
+      ;; No, return the next symbol from the stream.
+      (cond
+       ;; negated expression -- return it and advance one char.
+       ((looking-at "-") (forward-char 1) 'not)
+       ;; quoted string
+       ((looking-at "\"") (nnir-imap-delimited-string "\""))
+       ;; list expression -- we parse the content and return this as a list.
+       ((looking-at "(")
+	(nnir-imap-parse-query (nnir-imap-delimited-string ")")))
+       ;; keyword input -- return a symbol version
+       ((looking-at "\\band\\b") (forward-char 3) 'and)
+       ((looking-at "\\bor\\b")  (forward-char 2) 'or)
+       ((looking-at "\\bnot\\b") (forward-char 3) 'not)
+       ;; Simple, boring keyword
+       (t (let ((start (point))
+		(end (if (search-forward-regexp "[[:blank:]]" nil t)
+			 (prog1
+			     (match-beginning 0)
+			   ;; unskip if we hit a non-blank terminal character.
+			   (when (string-match "[^[:blank:]]" (match-string 0))
+			     (backward-char 1)))
+		       (goto-char (point-max)))))
+	    (buffer-substring start end)))))))
+
+(defun nnir-imap-delimited-string (delimiter)
+  "Return a delimited string from the current buffer."
+  (let ((start (point)) end)
+    (forward-char 1)			; skip the first delimiter.
+    (while (not end)
+      (unless (search-forward delimiter nil t)
+	(error "Unmatched delimited input with %s in query" delimiter))
+      (let ((here (point)))
+	(unless (equal (buffer-substring (- here 2) (- here 1)) "\\")
+	  (setq end (point)))))
+    (buffer-substring (1+ start) (1- end))))
+
+(defun nnir-imap-end-of-input ()
+  "Are we at the end of input?"
+  (skip-chars-forward "[[:blank:]]")
+  (looking-at "$"))
+  
+
 ;; Swish++ interface.
 ;; -cc- Todo
 ;; Search by
@@ -924,11 +1154,11 @@
 ;; - file size
 ;; - group
 (defun nnir-run-swish++ (query server &optional group)
-  "Run given query against swish++.
+  "Run QUERY against swish++.
 Returns a vector of (group name, file name) pairs (also vectors,
 actually).
 
-Tested with swish++ 4.7 on GNU/Linux and with with swish++ 5.0b2 on
+Tested with swish++ 4.7 on GNU/Linux and with swish++ 5.0b2 on
 Windows NT 4.0."
 
   (when group
@@ -938,8 +1168,15 @@
     (let ( (qstring (cdr (assq 'query query)))
 	   (groupspec (cdr (assq 'group query)))
 	   (prefix (nnir-read-server-parm 'nnir-swish++-remove-prefix server))
-           (artlist nil)
-           (score nil) (artno nil) (dirnam nil) (group nil) )
+           artlist
+	   ;; nnml-use-compressed-files might be any string, but probably this
+	   ;; is sufficient.  Note that we can't only use the value of
+	   ;; nnml-use-compressed-files because old articles might have been
+	   ;; saved with a different value.
+	   (article-pattern (if (string= server "nnmaildir:")
+				":[0-9]+"
+			      "^[0-9]+\\(\\.[a-z0-9]+\\)?$"))
+           score artno dirnam group filenam )
 
       (when (equal "" qstring)
         (error "swish++: You didn't enter anything."))
@@ -982,38 +1219,18 @@
       (while (re-search-forward
               "\\(^[0-9]+\\) \\([^ ]+\\) [0-9]+ \\(.*\\)$" nil t)
         (setq score (match-string 1)
-              artno (file-name-nondirectory (match-string 2))
-              dirnam (file-name-directory (match-string 2)))
+	      filenam (match-string 2)
+              artno (file-name-nondirectory filenam)
+              dirnam (file-name-directory filenam))
 
         ;; don't match directories
-        (when (string-match "^[0-9]+\\(\\.[a-z0-9]+\\)?$" artno)
-	  ;; nnml-use-compressed-files might be any string, but probably this
-	  ;; is sufficient.  Note that we can't only use the value of
-	  ;; nnml-use-compressed-files because old articles might have been
-	  ;; saved with a different value.
+        (when (string-match article-pattern artno)
           (when (not (null dirnam))
 
 	    ;; maybe limit results to matching groups.
 	    (when (or (not groupspec)
 		      (string-match groupspec dirnam))
-
-	      ;; remove nnir-swish++-remove-prefix from beginning of dirname
-	      (when (string-match (concat "^" prefix)
-				  dirnam)
-		(setq dirnam (replace-match "" t t dirnam)))
-
-	      (setq dirnam (substring dirnam 0 -1))
-	      ;; eliminate all ".", "/", "\" from beginning. Always matches.
-	      (string-match "^[./\\]*\\(.*\\)$" dirnam)
-	      ;; "/" -> "."
-	      (setq group (substitute ?. ?/ (match-string 1 dirnam)))
-	      ;; "\\" -> "."
-	      (setq group (substitute ?. ?\\ group))
-
-	      (push (vector (nnir-group-full-name group server)
-			    (string-to-int artno)
-			    (string-to-int score))
-		    artlist)))))
+	      (nnir-add-result dirnam artno score prefix server artlist)))))
 
       (message "Massaging swish++ output...done")
 
@@ -1041,8 +1258,7 @@
 	  (prefix
 	   (or (nnir-read-server-parm 'nnir-swish-e-remove-prefix server)
 	       (error "Missing parameter `nnir-swish-e-remove-prefix'")))
-	  (artlist nil)
-	  (score nil) (artno nil) (dirnam nil) (group nil) )
+          artlist score artno dirnam group )
 
       (when (equal "" qstring)
         (error "swish-e: You didn't enter anything."))
@@ -1106,8 +1322,8 @@
             (setq group (substitute ?. ?\\ group))
 
             (push (vector (nnir-group-full-name group server)
-                          (string-to-int artno)
-                          (string-to-int score))
+                          (string-to-number artno)
+                          (string-to-number score))
                   artlist))))
 
       (message "Massaging swish-e output...done")
@@ -1183,8 +1399,8 @@
 	(when (string-match prefix dirnam)
 	  (setq dirnam (replace-match "" t t dirnam)))
 	(push (vector (nnir-group-full-name (substitute ?. ?/ dirnam) server)
-		      (string-to-int artno)
-		      (string-to-int score))
+		      (string-to-number artno)
+		      (string-to-number score))
 	      artlist))
       (message "Massaging hyrex-search output...done.")
       (apply 'vector
@@ -1206,15 +1422,14 @@
   (when group
     (error "The Namazu backend cannot search specific groups"))
   (save-excursion
-    (let (
-          (artlist nil)
-          (qstring (cdr (assq 'query query)))
+    (let ((article-pattern (if (string= server "nnmaildir:")
+			       ":[0-9]+"
+			     "^[0-9]+$"))
+          artlist
+	  (qstring (cdr (assq 'query query)))
 	  (prefix (nnir-read-server-parm 'nnir-namazu-remove-prefix server))
-          (score nil)
-          (group nil)
-          (article nil)
-	  (process-environment (copy-sequence process-environment))
-          )
+          score group article
+          (process-environment (copy-sequence process-environment)))
       (setenv "LC_MESSAGES" "C")
       (set-buffer (get-buffer-create nnir-tmp-buffer))
       (erase-buffer)
@@ -1256,18 +1471,9 @@
               article (file-name-nondirectory (match-string 4)))
 
         ;; make sure article and group is sane
-        (when (and (string-match "^[0-9]+$" article)
+        (when (and (string-match article-pattern article)
                    (not (null group)))
-          (when (string-match (concat "^" prefix) group)
-            (setq group (replace-match "" t t group)))
-
-          ;; remove trailing slash from groupname
-          (setq group (substring group 0 -1))
-
-          ;; stuff results into artlist vector
-          (push (vector (nnir-group-full-name (substitute ?. ?/ group) server)
-                        (string-to-int article)
-                        (string-to-int score)) artlist)))
+	  (nnir-add-result group article score prefix server artlist)))
 
       ;; sort artlist by score
       (apply 'vector
@@ -1453,7 +1659,7 @@
     ;; from each artitem, extract group component
     (setq with-dups (mapcar 'nnir-artitem-group artlist))
     ;; remove duplicates from above
-    (mapcar (function (lambda (x) (add-to-list 'res x)))
+    (mapc (function (lambda (x) (add-to-list 'res x)))
             with-dups)
     res))
 
Index: gnus/contrib/smtpmail.el
diff -u gnus/contrib/smtpmail.el:7.12 gnus/contrib/smtpmail.el:7.13
--- gnus/contrib/smtpmail.el:7.12	Sun Jan 20 06:23:59 2008
+++ gnus/contrib/smtpmail.el	Thu Apr 24 06:19:22 2008
@@ -1030,5 +1030,5 @@
 
 (provide 'smtpmail)
 
-;;; arch-tag: a76992df-6d71-43b7-9e72-4bacc6c05466
+;; arch-tag: a76992df-6d71-43b7-9e72-4bacc6c05466
 ;;; smtpmail.el ends here
Index: gnus/etc/ChangeLog
diff -u gnus/etc/ChangeLog:1.5 gnus/etc/ChangeLog:1.6
--- gnus/etc/ChangeLog:1.5	Thu Apr 10 20:55:44 2008
+++ gnus/etc/ChangeLog	Fri Apr 11 08:39:27 2008
@@ -1,3 +1,7 @@
+2008-04-11  Reiner Steib  <[email protected]>
+
+	* ChangeLog: Bump version to 0.9.
+
 2008-04-10  Reiner Steib  <[email protected]>
 
 	* ChangeLog: No Gnus v0.8 is released.
Index: gnus/etc/images/README
diff -u gnus/etc/images/README:1.8 gnus/etc/images/README:1.9
--- gnus/etc/images/README:1.8	Sun Jan 20 06:24:00 2008
+++ gnus/etc/images/README	Thu Apr 24 06:19:22 2008
@@ -57,6 +57,7 @@
 Emacs images and their source in the GNOME icons stock/ directory:
 
   attach.xpm                document/stock_attach
+  bookmark_add.xpm          actions/bookmark_add
   cancel.xpm                slightly modified generic/stock_stop
   connect.xpm               net/stock_connect
   contact.xpm               net/stock_contact
Index: gnus/lisp/ChangeLog
diff -u gnus/lisp/ChangeLog:7.1827 gnus/lisp/ChangeLog:7.1843
--- gnus/lisp/ChangeLog:7.1827	Thu Apr 10 20:55:44 2008
+++ gnus/lisp/ChangeLog	Thu May  1 16:26:34 2008
@@ -1,3 +1,84 @@
+2008-05-01  Lars Magne Ingebrigtsen  <[email protected]>
+
+	* gnus-sum.el (gnus-summary-save-parts): Inhibit even more treatment
+	hooks. 
+	(gnus-update-read-articles): Speed up non-marks-using users.
+	(gnus-use-marks): Define gnus-use-marks.
+	(gnus-propagate-marks): Rename variable to something more sensible.
+
+2008-04-28  Teodor Zlatanov  <[email protected]>
+
+	* mail-source.el (mail-source-set-1, mail-source-bind): Moved
+	auth-source code out of the macro to clean it up and fix bugs.
+
+2008-04-26  Teodor Zlatanov  <[email protected]>
+
+	* gnus-registry.el (gnus-registry-split-fancy-with-parent): Don't split
+	by sender if it's equal to user-mail-address, it's likely to be
+	useless.
+
+	* mail-source.el (mail-source-bind): Don't use user or password if they
+	are not bound.  Unintern them if they are nil.  Don't use server unless
+	it's bound, and default it to empty string otherwise.
+
+2008-04-25  Teodor Zlatanov  <[email protected]>
+
+	* mail-source.el: Load auth-source.el.
+	(mail-source-bind): Add comments.  Call auth-source-user-or-password to
+	get user name or password, if auth-sources is set up.
+
+	* gnus-registry.el (gnus-registry-split-strategy): New variable for
+	strategy of splitting with parent.
+	(gnus-registry-split-fancy-with-parent)
+	(gnus-registry-post-process-groups): Use it and fix prior
+	bug (returning a list as the split result).
+
+	* auth-source.el (auth-sources): Remove server parameter.
+	(auth-source-pick, auth-source-user-or-password)
+	(auth-source-user-or-password-imap)
+	(auth-source-user-or-password-pop3, auth-source-user-or-password-ssh)
+	(auth-source-user-or-password-sftp)
+	(auth-source-user-or-password-smtp): Remove server parameter.
+
+2008-04-24  Luca Capello  <[email protected]>  (tiny change)
+
+	* mm-encode.el (mm-safer-encoding): Add optional argument `type'.
+	Don't use QP for message/rfc822.
+	(mm-content-transfer-encoding): Pass `type' to mm-safer-encoding.
+
+2008-04-22  Juri Linkov  <[email protected]>
+
+	* mailcap.el (mailcap-file-default-commands): New function.
+
+2008-04-13  Reiner Steib  <[email protected]>
+
+	* message.el (message-signature-separator, message-cite-function):
+	Change custom version.
+
+2008-04-13  Naohiro Aota  <[email protected]>  (tiny change)
+
+	* tls.el (tls-program): Add -ign_eof argument to call the openssl
+	commands.
+	(tls-checktrust): Ditto.
+
+2008-04-13  Reiner Steib  <[email protected]>
+
+	* mm-decode.el (mm-display-external): Make temp file read-only.
+
+2008-04-12  Reiner Steib  <[email protected]>
+
+	* gnus-diary.el (gnus-article-edit-mode-map, message-mode-map): Remove
+	binding for `gnus-diary-version'.  Bind `gnus-diary-check-message' to
+	`C-c C-f d'.
+
+2008-04-12  Adrian Aichner  <[email protected]>
+
+	* gnus-sum.el (gnus-summary-goto-subject): Typo fix.
+
+2008-04-11  Reiner Steib  <[email protected]>
+
+	* gnus.el: Bump version to 0.9.
+
 2008-04-10  Reiner Steib  <[email protected]>
 
 	* gnus.el: No Gnus v0.8 is released.
@@ -32,6 +113,37 @@
 	* gnus-registry.el: Initialize the registry when gnus-registry-install
 	is t.
 
+2008-04-08  Katsumi Yamaoka  <[email protected]>
+
+	* compface.el (uncompface): Make buffer unibyte.
+
+2008-04-05  Glenn Morris  <[email protected]>
+
+	* gnus-ems.el (mm-disable-multibyte): Autoload it.
+
+2008-04-05  Stefan Monnier  <[email protected]>
+
+	* mm-util.el (mm-with-unibyte-buffer, mm-with-multibyte-buffer): Prefer
+	mm-(en|dis)able-multibyte to default-enable-multibyte-characters.
+
+	* nnheader.el (nnheader-init-server-buffer): Change buffer's
+	multibyteness after rather than before erasing it.
+
+	* gnus-art.el (gnus-mime-replace-part): Remove unnecessary use of
+	mm-with-multibyte.
+	(gnus-request-article-this-buffer): Make sure the proper decoding is
+	used if gnus-original-article-buffer happens to be unibyte.
+
+	* gnus-ems.el (gnus-x-splash): Prefer mm-disable-multibyte to
+	default-enable-multibyte-characters.
+
+	* gnus-fun.el (gnus-display-x-face-in-from): Remove unnecessary use of
+	default-enable-multibyte-characters.
+
+	* mm-decode.el (mm-inline-media-tests): Add entry for x-diff.
+
+	* nnweb.el (nnweb-init): Avoid nn-with-unibyte.
+
 2008-04-02  Simon Josefsson  <[email protected]>
 
 	* imap.el (imap-enable-exchange-bug-workaround): New variable.
@@ -52,18 +164,47 @@
 	to enable bug workaround or not.
 	(nnimap-find-minmax-uid): Only enable workaround conditionally.
 
+2008-03-31  Glenn Morris  <[email protected]>
+
+	* message.el (mml2015-use): Declare for compiler.
+	(message-info): Require mml2015 when appropriate.
+
+2008-03-31  Katsumi Yamaoka  <[email protected]>
+
+	* Makefile.in (EMACS_COMP): Quote directory name that might contain
+	whitespace.
+
+2008-03-30  Stefan Monnier  <[email protected]>
+
+	* nntp.el (nntp-netcat-command): Rename from nntp-via-netcat-command.
+	(nntp-netcat-switches): Rename from nntp-via-netcat-switches.
+	(nntp-open-telnet, nntp-open-rlogin): Use with-current-buffer.
+	(nntp-service-to-port): New function.
+	(nntp-open-via-rlogin-and-netcat, nntp-open-via-telnet-and-telnet)
+	(nntp-open-telnet-stream, nntp-open-via-rlogin-and-telnet): Use it.
+	(nntp-open-netcat-stream): New function.
+	(nntp-open-via-rlogin-and-netcat): Don't use a pty.
+
 2008-03-29  Sven Joachim  <[email protected]>
 
 	* gnus-sum.el (gnus-summary-make-menu-bar): Add missing dots.
 
+2008-03-29  Stefan Monnier  <[email protected]>
+
+	* message.el (message-make-in-reply-to): Use mm-with-multibyte-buffer.
+
+2008-03-28  Magnus Henoch  <[email protected]>
+
+	* dns.el (dns-write): Use set-buffer-multibyte.
+
 2008-03-28  Michael Harnois  <[email protected]>  (tiny change)
 
 	* nnimap.el (nnimap-find-minmax-uid): Fix Exchange 2007 IMAP problem.
 
 2008-03-24  Reiner Steib  <[email protected]>
 
-	* message.el (message-signature-separator): Change default.  Improve
-	custom type.
+	* message.el (message-signature-separator): Change default.
+	Improve custom type.
 	(message-cite-function): Change default to
 	message-cite-original-without-signature.
 
@@ -109,6 +250,11 @@
 
 	* message.el (message-simplify-recipients): Fix previous commit.
 
+2008-03-20  Stefan Monnier  <[email protected]>
+
+	* mm-util.el (mm-set-buffer-multibyte): New function.
+	* mm-decode.el (mm-copy-to-buffer): Use it.
+
 2008-03-19  Glenn Morris  <[email protected]>
 
 	* tls.el (open-tls-stream): Restore use of `tls-end-of-info'.
@@ -116,8 +262,8 @@
 
 2008-03-19  Reiner Steib  <[email protected]>
 
-	* message.el (message-alter-recipients-discard-bogus-full-name): New
-	function.
+	* message.el (message-alter-recipients-discard-bogus-full-name):
+	New function.
 	(message-alter-recipients-function): New variable.
 	(message-get-reply-headers): Use it.
 	(message-replace-header): New helper function.
@@ -164,6 +310,10 @@
 	(gnus-button-alist): Extend gnus-button-handle-info-keystrokes entry.
 	(gnus-button-handle-info-keystrokes): Handle index entries.
 
+2008-03-15  Glenn Morris  <[email protected]>
+
+	* parse-time.el (parse-time-string): Simplify.
+
 2008-03-14  Katsumi Yamaoka  <[email protected]>
 
 	* mail-source.el (mail-source-delete-old-incoming) Fix regexp to find
@@ -174,6 +324,14 @@
 	* auth-source.el (auth-sources): Renamed from auth-source-choices.
 	(auth-source-pick): Use it.
 
+2008-03-12  Stefan Monnier  <[email protected]>
+
+	* binhex.el (binhex-decode-region-internal):
+	* uudecode.el (uudecode-decode-region-internal):
+	* dns.el (dns-read-string-name, dns-read, dns-read-type, query-dns):
+	* sha1.el (sha1-string-external): Use set-buffer-multibyte rather than
+	setting default-enable-multibyte-characters.
+
 2008-03-12  Teodor Zlatanov  <[email protected]>
 
 	* auth-source.el (auth-source-protocols)
@@ -192,6 +350,53 @@
 	(nntp-open-via-rlogin-and-netcat, nntp-open-via-telnet-and-telnet):
 	Make sure the nntp port to specify is a string.
 
+2008-03-12  Stefan Monnier  <[email protected]>
+
+	* nntp.el: Use with-current-buffer.
+	(nntp-send-buffer): Just set the buffer to unibyte rather than use the
+	dubious mm-with-unibyte-current-buffer.
+	(nntp-with-open-group-function): New function extracted from
+	nntp-with-open-group macro.
+	(nntp-with-open-group): Use the function, so it's easier to debug.
+	Add indentation and debugging info.
+	(nntp-open-telnet-stream, nntp-open-via-rlogin-and-telnet): Recommend
+	the use of the netcat alternatives.
+
+	* rfc2047.el (rfc2047-decode-string): Don't use `m'.
+	Avoid mm-string-as-multibyte as well.
+
+	* nnweb.el (nnweb-insert-html):
+	Remove use of nnheader-string-as-multibyte.
+
+	* nnheader.el (nnheader-init-server-buffer): Use with-current-buffer.
+	(nnheader-string-as-multibyte): Remove.
+
+	* mm-view.el: Use inhibit-read-only.
+	(mm-inline-text-html-render-with-w3, mm-inline-message): Use dolist.
+	(mm-pkcs7-signed-magic, mm-pkcs7-enveloped-magic): Use just string
+	or unibyte-string.
+
+	* mm-uu.el (mm-uu-copy-to-buffer): Preserve (uni/multi)byteness.
+	(mm-uu-yenc-extract): Use with-current-buffer.
+
+	* gnus-soup.el (gnus-soup-send-packet): Don't use
+	mm-with-unibyte-current-buffer since the buffer is unibyte anyway.
+
+	* nnmh.el: Use with-current-buffer.
+	(nnmh-request-list-1): Use mm-string-to-multibyte rather than
+	mm-string-as-multibyte on the output of mm-encode-coding-string.
+
+	* nnimap.el (nnimap-retrieve-headers-progress): Use a unibyte buffer.
+	(nnimap-request-move-article): Use with-current-buffer.
+
+	* mm-decode.el (mm-with-part): Set the buffer to unibyte before
+	inserting the handle-buffer's text, so the implicit multibyte->unibyte
+	conversion uses string-make-unibyte rather than string-as-unibyte.
+
+	* gnus-msg.el: Use with-current-buffer.
+
+	* message.el (message-ignored-resent-headers): Add "Delivered-To".
+
 2008-03-10  Daiki Ueno  <[email protected]>
 
 	* mml2015.el (mml2015-epg-passphrase-callback): Type cast KEY-ID to a
@@ -201,10 +406,15 @@
 
 	* lpath.el: Consider the case without Emacs/W3.
 
+2008-03-08  Glenn Morris  <[email protected]>
+
+	* time-date.el (date-to-time, time-subtract, time-add)
+	(safe-date-to-time): Doc fixes.
+
 2008-03-08  Reiner Steib  <[email protected]>
 
-	* mail-source.el (mail-source-delete-old-incoming-confirm): Change
-	default to nil.
+	* mail-source.el (mail-source-delete-old-incoming-confirm):
+	Change default to nil.
 	(mail-source-delete-old-incoming): Make confirmation prompt more clear.
 
 2008-03-07  Katsumi Yamaoka  <[email protected]>
@@ -218,6 +428,12 @@
 
 	* mm-view.el (mm-w3m-standalone-supports-m17n-p): Fix typo.
 
+2008-03-07  Karl Fogel  <[email protected]>
+
+	* gnus-bookmark.el: Adjust for renames in bookmark.el.
+	(gnus-bookmark-make-record): Was `gnus-bookmark-make-cell'.
+	(gnus-bookmark-jump): Adjust some variable names.
+
 2008-03-06  Teodor Zlatanov  <[email protected]>
 
 	* auth-source.el: New package.
@@ -230,7 +446,7 @@
 
 	* gnus-registry.el (gnus-registry-install): Allow 'ask as an option.
 	(gnus-registry-initialize, gnus-registry-install-p): Use it.
-	(gnus-registry-install-shortcuts): Renamed from
+	(gnus-registry-install-shortcuts): Rename from
 	gnus-registry-install-shortcuts-and-menus.  Installs the shortcuts in
 	the `gnus-registry-mark-map' keymap dynamically from
 	`gnus-registry-marks'.  The generated functions update the summary line
@@ -241,11 +457,24 @@
 	* gnus-sum.el (gnus-summary-make-menu-bar): Add menu entries for all
 	the registry mark functions.
 
+2008-03-05  Glenn Morris  <[email protected]>
+
+	* gnus-art.el (gnus-article-mode-line-format-alist): Move to gnus-sum.
+	* gnus-sum.el (gnus-article-mode-line-format-alist): Move here from
+	gnus-art.
+	(top-level): No need to load own source when compiling.
+
 2008-03-04  Reiner Steib  <[email protected]>
 
 	* gnus-sum.el (gnus-print-buffer): Honor ps-print-color-p.
 	Suggested by <[email protected]>.
 
+2008-03-04  Glenn Morris  <[email protected]>
+
+	* gnus-sum.el (top-level): No need to require gnus when compiling,
+	since unconditionally required near start of file.
+	(gnus-summary-display-while-building): Move definition before use.
+
 2008-03-04  Teodor Zlatanov  <[email protected]>
 
 	* gnus-registry.el (gnus-registry-user-format-function-M): Add
@@ -263,6 +492,20 @@
 	* gnus-art.el (gnus-article-describe-bindings): Work for the version of
 	`where-is-internal' that returns a range of key sequences.
 
+2008-03-03  Stefan Monnier  <[email protected]>
+
+	* mm-bodies.el (mm-decode-content-transfer-encoding): Simplify.
+
+	* gnus-sum.el: Use inhibit-read-only and with-current-buffer.
+	(gnus-summary-jump-to-group): Consider windows on other displayed
+	frames as well.  Similar changes might be needed elsewhere, but that's
+	the one I've bumped into during my use.
+
+	* nndoc.el (nndoc-oe-dbx-type-p):
+	* gnus-msg.el (gnus-debug):
+	* gnus-group.el (gnus-update-group-mark-positions):
+	Use mm-string-to-multibyte.
+
 2008-03-02  Reiner Steib  <[email protected]>
 
 	* mml2015.el (mml2015-extract-cleartext-signature): Explain that it
@@ -412,9 +655,9 @@
 2008-02-11  Reiner Steib  <[email protected]>
 
 	* gnus-topic.el (gnus-topic-select-group, gnus-topic-read-group):
-	Document negativ prefix.
+	Document negative prefix.
 
-	* gnus-group.el (gnus-group-read-group): Document negativ prefix.
+	* gnus-group.el (gnus-group-read-group): Document negative prefix.
 
 2008-02-10  Lars Magne Ingebrigtsen  <[email protected]>
 
@@ -708,7 +951,7 @@
 	(gnus-mime-delete-part): Don't write description line if empty.
 	(gnus-article-encrypt-body): Add confirmation for gnus-novice-user.
 
-2007-12-14  Johan Bockg,Ae(Brd  <[email protected]>
+2007-12-14  Johan BockgÃ¥rd  <[email protected]>
 
 	* gnus-sum.el (gnus-summary-mark-unread-as-read)
 	(gnus-summary-mark-read-and-unread-as-read)
@@ -1122,8 +1365,8 @@
 
 	* gnus-cache.el (gnus-jog-cache): Ditto.
 
-	* gnus-msg.el (gnus-summary-reply): Ignore
-	gnus-confirm-mail-reply-to-news for wide and very wide replies.
+	* gnus-msg.el (gnus-summary-reply):
+	Ignore gnus-confirm-mail-reply-to-news for wide and very wide replies.
 
 2007-11-24  Reiner Steib  <[email protected]>
 
@@ -1142,8 +1385,8 @@
 
 2007-11-24  Reiner Steib  <[email protected]>
 
-	* gnus-cache.el (gnus-cache-generate-nov-databases): Use
-	nnml-generate-nov-databases-directory instead of
+	* gnus-cache.el (gnus-cache-generate-nov-databases):
+	Use nnml-generate-nov-databases-directory instead of
 	nnml-generate-nov-databases-1.
 
 2007-11-24  Glenn Morris  <[email protected]>
@@ -1405,8 +1648,11 @@
 	(message-fix-before-sending): Add `bogus-recipient'.
 
 	* gnus-art.el (gnus-button-mid-or-mail-heuristic-alist): Add "alpine".
-	(gnus-treat-emphasize, gnus-treat-body-boundary): Don't test
-	window-system.
+	(gnus-treat-body-boundary): Don't test window-system.
+
+2007-10-28  Leo <[email protected]>  (tiny change)
+
+	* gnus-art.el (gnus-treat-emphasize): Don't test window-system.
 
 2007-10-28  Miles Bader  <[email protected]>
 
@@ -1421,7 +1667,7 @@
 2007-10-26  Reiner Steib  <[email protected]>
 
 	* message.el (message-remove-blank-cited-lines): New function.
-	Suggested by Karl Pl,Ad(Bsterer.
+	Suggested by Karl Plästerer.
 
 2007-10-25  Katsumi Yamaoka  <[email protected]>
 
@@ -1903,7 +2149,7 @@
 	* mm-uu.el (mm-uu-type-alist): Refer to mm-uu-configure-list in doc
 	string.
 
-2007-07-20  Micha,Ak(Bl Cadilhac  <[email protected]>
+2007-07-20  Michaël Cadilhac  <[email protected]>
 
 	* nnrss.el (nnrss-ignore-article-fields): New variable.  List of fields
 	that should be ignored when comparing distant RSS articles with local
@@ -2252,8 +2498,8 @@
 
 2007-05-24  Katsumi Yamaoka  <[email protected]>
 
-	* message.el (message-narrow-to-headers-or-head): Ignore
-	mail-header-separator in the body.
+	* message.el (message-narrow-to-headers-or-head):
+	Ignore mail-header-separator in the body.
 
 2007-05-23  Katsumi Yamaoka  <[email protected]>
 
@@ -2271,7 +2517,7 @@
 	* dgnushack.el: Autoload ad-add-advice for XEmacs.  bbdb-com.el that
 	spam.el loads uses it in the compiled defadvice form.
 
-2007-05-12  Micha,Ak(Bl Cadilhac  <[email protected]>
+2007-05-12  Michaël Cadilhac  <[email protected]>
 
 	* gnus-sum.el (gnus-articles-to-read)
 	(gnus-summary-insert-old-articles): Don't truncate group name for
@@ -2282,7 +2528,7 @@
 	* gnus-sum.el (gnus-simplify-subject-fully): Use
 	`truncate-string-to-width' instead.
 
-2007-05-11  Micha,Ak(Bl Cadilhac  <[email protected]>
+2007-05-11  Michaël Cadilhac  <[email protected]>
 
 	* gnus-sum.el (gnus-summary-next-group-on-exit): New variable.  Tell
 	if, on summary exit, the next group has to be selected.
@@ -2632,7 +2878,7 @@
 
 	* smiley.el (smiley-regexp-alist): Add "dead" smiley.
 
-2007-02-14  Micha,Ak(Bl Cadilhac  <[email protected]>
+2007-02-14  Michaël Cadilhac  <[email protected]>
 
 	* nntp.el (nntp-send-command): Don't wait for echoes when
 	nntp-open-ssl-stream is used.
@@ -2870,7 +3116,7 @@
 
 	* gnus-cite.el (gnus-message-citation-mode): Don't define in XEmacs.
 
-2006-12-29  Jouni K. Sepp,Ad(Bnen  <[email protected]>
+2006-12-29  Jouni K. Seppänen  <[email protected]>
 
 	* nnimap.el (nnimap-expunge-search-string): Mention
 	nnimap-search-uids-not-since-is-evil in docstring.
@@ -3029,7 +3275,7 @@
 	* gnus-sum.el (gnus-sort-threads, gnus-summary-limit-children):
 	Use `max' to avoid the value of `max-lisp-eval-depth' decreasing.
 
-2006-12-04  Jouni K. Sepp,Ad(Bnen  <[email protected]>
+2006-12-04  Jouni K. Seppänen  <[email protected]>
 
 	* mm-url.el (mm-url-predefined-programs): Call curl with correct
 	options.
@@ -3645,7 +3891,7 @@
 
 	* pgg-def.el (pgg-truncate-key-identifier): Truncate the key ID to 8
 	letters from the end.  Thanks to "David Smith" <[email protected]> and
-	[email protected] (Andreas V,Av(Bgele).
+	[email protected] (Andreas Vögele).
 
 	FIXME: Use `tiny change'?
 
@@ -3998,7 +4244,7 @@
 
 	* nnrss.el (nnrss-check-group): Bind hash-index.
 
-2006-05-23  Micha,Ak(Bl Cadilhac  <[email protected]>
+2006-05-23  Michaël Cadilhac  <[email protected]>
 
 	* nnrss.el (nnrss-check-group): Use the md5sum of the whole RSS item as
 	its hash index.  Store this hash in `nnrss-group-data'.
@@ -4411,7 +4657,7 @@
 	* 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)
+2006-04-16  João 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
@@ -4600,7 +4846,7 @@
 	* 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]>
+2006-04-11  Arne Jørgensen  <[email protected]>
 
 	* gnus-sieve.el (gnus-sieve-generate): Delete from the start of
 	the sieve region.
@@ -5234,7 +5480,7 @@
 	Lisp error; give up parsing of parameters if it failed in
 	extracting type.
 
-2006-02-14  Arne J,Ax(Brgensen  <[email protected]>
+2006-02-14  Arne Jørgensen  <[email protected]>
 
 	* smime.el (smime-cert-by-ldap-1): Fix bug where
 	`smime-ldap-search' returns results without userCertificates.
@@ -6223,6 +6469,10 @@
 
 	* mml.el (mml-preview): Use it; doc fix.
 
+2005-10-30  Chong Yidong  <[email protected]>
+
+	* imap.el (imap-open): Handle case where buffer is a buffer object.
+
 2005-10-29  Romain Francoise  <[email protected]>
 
 	* message.el (message-fix-before-sending): Fix comment.
@@ -6246,7 +6496,7 @@
 	whitespace removed in revision 7.8.  Use concatenated string to
 	protect trailing whitespace.
 
-2005-10-27  Jouni K. Sepp,Ad(Bnen  <[email protected]>
+2005-10-27  Jouni K. Seppänen  <[email protected]>
 
 	* nnimap.el (nnimap-search-uids-not-since-is-evil): Add variable.
 	(nnimap-request-expire-articles): Use it to avoid sending 'UID
@@ -6259,7 +6509,7 @@
 	* gnus-group.el (gnus-group-compact-group): Invalidate original
 	article buffer.
 	* gnus-srvr.el (gnus-server-compact-server): Ditto.
-	* nnml.el (nnml-request-compact-group): handle self Xref: field in
+	* nnml.el (nnml-request-compact-group): Handle self Xref: field in
 	NOV database and in article itself.
 	Invalidate article backlog.
 
@@ -6277,7 +6527,6 @@
 	* message.el (message-display-completion-list): New function.
 	(message-expand-group): Use it; make sure the Completions buffer
 	is modifiable.
-
 2005-10-23  Chong Yidong  <[email protected]>
 
 	* gnus-sum.el (gnus-ignored-from-addresses): Handle case where
@@ -6537,7 +6786,7 @@
 
 	* message.el (message-idna-to-ascii-rhs-1): Reformat.
 
-2005-09-27  Arne J,Ax(Brgensen  <[email protected]>
+2005-09-27  Arne Jørgensen  <[email protected]>
 
 	* message.el (message-remove-duplicates): New function.
 	Implementation borrowed from `gnus-remove-duplicates'.
@@ -6759,8 +7008,7 @@
 
 2005-09-05  Reiner Steib  <[email protected]>
 
-	* message.el (message-tab-body-function): Fixed mismatched custom
-	type.
+	* message.el (message-tab-body-function): Fix mismatched custom type.
 
 	* gnus.el (gnus-group-change-level-function): Ditto.
 
@@ -7189,7 +7437,7 @@
 	* mm-extern.el (mm-extern-local-file, mm-inline-external-body):
 	* pop3.el (pop3-user): Don't use `format' on `error' arguments.
 
-2005-06-16  Arne J,Ax(Brgensen  <[email protected]>
+2005-06-16  Arne Jørgensen  <[email protected]>
 
 	* smime.el (smime-cert-by-ldap-1): Detect PEM format without
 	header by looking for magic "MII" at the beginnig.
@@ -7414,7 +7662,7 @@
 	* smime.el (smime-cert-by-ldap-1): Don't use
 	replace-regexp-in-string.
 
-2005-05-31  Arne J,Ax(Brgensen  <[email protected]>
+2005-05-31  Arne Jørgensen  <[email protected]>
 
 	* smime-ldap.el (smime-ldap-search): Add compatibility for XEmacs.
 
@@ -7857,7 +8105,7 @@
 
 	* nnimap.el (nnimap-retrieve-headers-from-server): Fix last change.
 
-2005-03-10  Arne J,Ax(Brgensen  <[email protected]>  (tiny change)
+2005-03-10  Arne Jørgensen  <[email protected]>  (tiny change)
 
 	* nnimap.el (nnimap-retrieve-headers-from-server): Fix off-by-one flaw.
 
@@ -7972,7 +8220,7 @@
 	* gnus-sum.el (gnus-summary-exit): Move point after displaying the
 	buffer, so it moves the window's cursor.
 
-2005-02-26  Arne J,Ax(Brgensen  <[email protected]>
+2005-02-26  Arne Jørgensen  <[email protected]>
 
 	* mm-decode.el (mm-dissect-buffer): Pass the from field on to
 	`mm-dissect-multipart' and receive the from field as an (optional)
@@ -8008,12 +8256,12 @@
 2005-02-22  Simon Josefsson  <[email protected]>
 
 	* encrypt.el (encrypt-password-cache-expiry): Remove (use
-	`password-cache-expiry' instead).  Reported by Arne J,Ax(Brgensen
+	`password-cache-expiry' instead).  Reported by Arne Jørgensen
 	<[email protected]>.
 	(encrypt): Add password-cache and password-cache-expiry as group
 	members.
 
-2005-02-22  Arne J,Ax(Brgensen  <[email protected]>
+2005-02-22  Arne Jørgensen  <[email protected]>
 
 	* smime.el (smime-ldap-host-list): Doc fix.
 	(smime-ask-passphrase): Use `password-read-and-add' to read (and
@@ -8033,7 +8281,7 @@
 
 	* mml.el (mml-parse-1): Use them.
 
-2005-02-21  Arne J,Ax(Brgensen  <[email protected]>
+2005-02-21  Arne Jørgensen  <[email protected]>
 
 	* nnrss.el (nnrss-verbose): Removed.
 	(nnrss-request-group): Use `nnheader-message' instead.
@@ -8097,7 +8345,7 @@
 	mml-smime-get-dns-ldap.
 	(mml-smime-encrypt-query): Use new function.  Default to ldap.
 
-2005-02-14  Arne J,Ax(Brgensen  <[email protected]>
+2005-02-14  Arne Jørgensen  <[email protected]>
 
 	* smime.el: Require smime-ldap.
 	(smime-ldap-host-list): New variable.
@@ -8365,8 +8613,8 @@
 
 2005-01-03  Reiner Steib  <[email protected]>
 
-	* gnus-score.el (gnus-decay-scores, gnus-score-load-file): Allow
-	to apply decay on score files matching a regexp.
+	* gnus-score.el (gnus-decay-scores, gnus-score-load-file):
+	Allow to apply decay on score files matching a regexp.
 
 2004-12-30  Katsumi Yamaoka  <[email protected]>
 
@@ -8744,7 +8992,7 @@
 
 	* gnus-art.el (gnus-header-button-alist): Handle URLs in OpenPGP:
 	headers separately.
-	(gnus-button-openpgp): New function, inspired by Jochen K,A|(Bpper
+	(gnus-button-openpgp): New function, inspired by Jochen Küpper
 	<[email protected]>.
 
 2004-11-14  Reiner Steib  <[email protected]>
@@ -9833,8 +10081,7 @@
 
 2004-08-26  Katsumi Yamaoka  <[email protected]>
 
-	* nndoc.el (nndoc-type-alist): Fix regexp in the rfc822-forward
-	entry.
+	* nndoc.el (nndoc-type-alist): Fix regexp in the rfc822-forward entry.
 
 	* gnus-group.el (gnus-group-line-format-alist): Convert the value
 	of gnus-tmp-news-method into string under XEmacs.  It will be
@@ -9848,8 +10095,8 @@
 	(gnus-pp): New function.
 	(gnus-pp-to-string): New function.
 
-	* gnus-cus.el (gnus-agent-cat-prepare-category-field): Replace
-	pp-to-string with gnus-pp-to-string.
+	* gnus-cus.el (gnus-agent-cat-prepare-category-field):
+	Replace pp-to-string with gnus-pp-to-string.
 	* gnus-eform.el (gnus-edit-form): Replace pp with gnus-pp.
 	* gnus-group.el (gnus-group-make-kiboze-group): Ditto.
 	* gnus-msg.el (gnus-debug): Ditto.
@@ -9863,13 +10110,13 @@
 
 2004-08-23  Katsumi Yamaoka  <[email protected]>
 
-	* gnus-art.el (article-display-face, article-display-x-face): Use
-	buffer-read-only.
+	* gnus-art.el (article-display-face, article-display-x-face):
+	Use buffer-read-only.
 
 2004-08-22  Katsumi Yamaoka  <[email protected]>
 
-	* gnus-art.el (article-hide-list-identifiers): Bind
-	inhibit-read-only as t.
+	* gnus-art.el (article-hide-list-identifiers):
+	Bind inhibit-read-only as t.
 
 2004-08-22  Reiner Steib  <[email protected]>
 
@@ -10472,7 +10719,7 @@
 	(spam-mark-junk-as-spam-routine): Use it.  Allow to disable
 	assigning the spam-mark to new messages.
 
-2004-05-26  Adam Sj,Ax(Bgren  <[email protected]>  (tiny change)
+2004-05-26  Adam Sjøgren  <[email protected]>  (tiny change)
 
 	(spam-ham-copy-or-move-routine): Don't declare `todo' twice.
 
@@ -10613,7 +10860,7 @@
 	(spam-crm114-unregister-spam-routine)
 	(spam-crm114-register-ham-routine)
 	(spam-crm114-unregister-ham-routine): Add CRM114 support.  From
-	[email protected] (Adam Sj,Ax(Bgren).
+	[email protected] (Adam Sjøgren).
 
 	* gnus.el: Add spam-use-crm114.
 
@@ -11005,59 +11252,37 @@
 
 2004-04-25  Jesper Harder  <[email protected]>
 
-	* spam-stat.el (spam-stat-score-buffer): Simplify mapcar usage.
-	Use mapc when appropriate.
-
-	* sieve-manage.el (sieve-manage-open): do.
-
-	* nnweb.el (nnweb-insert-html): do.
-
+	* sieve-manage.el (sieve-manage-open):
+	* nnweb.el (nnweb-insert-html):
 	* nnvirtual.el (nnvirtual-catchup-group, nnvirtual-partition-sequence)
-	(nnvirtual-partition-sequence, nnvirtual-create-mapping): do.
-
-	* nnspool.el (nnspool-request-group): do.
-
+	(nnvirtual-partition-sequence, nnvirtual-create-mapping):
+	* nnspool.el (nnspool-request-group):
 	* nnrss.el (nnrss-opml-export, nnrss-find-el, nnrss-order-hrefs):
-	do.
-
-	* nnml.el (nnml-request-update-info): do.
-
+	* nnml.el (nnml-request-update-info):
 	* nnmh.el (nnmh-request-group, nnmh-request-list-1, nnmh-active-number)
-	(nnmh-request-create-group, nnmh-update-gnus-unreads): do.
-
+	(nnmh-request-create-group, nnmh-update-gnus-unreads):
 	* nnimap.el (nnimap-request-close, nnimap-acl-edit)
-	(nnimap-request-set-mark): do.
-
-	* nnfolder.el (nnfolder-request-update-info): do.
-
+	(nnimap-request-set-mark):
+	* nnfolder.el (nnfolder-request-update-info):
 	* mm-view.el (mm-pkcs7-signed-magic, mm-pkcs7-enveloped-magic):
-	do.
-
-	* mml.el (mml-destroy-buffers, mml-compute-boundary-1): do.
-
-	* gnus-uu.el (gnus-uu-find-articles-matching): do.
-
+	* mml.el (mml-destroy-buffers, mml-compute-boundary-1):
+	* gnus-uu.el (gnus-uu-find-articles-matching):
 	* gnus-topic.el (gnus-topic-check-topology, gnus-topic-remove-group):
-	do.
-
 	* gnus-sum.el (gnus-summary-fetch-faq, gnus-read-move-group-name):
-	do.
-
-	* gnus-score.el (gnus-score-load-file, gnus-sort-score-files): do.
-
-	* gnus-nocem.el (gnus-nocem-scan-groups): do.
-
-	* gnus-int.el (gnus-start-news-server): do.
-
+	* gnus-score.el (gnus-score-load-file, gnus-sort-score-files):
+	* gnus-nocem.el (gnus-nocem-scan-groups):
+	* gnus-int.el (gnus-start-news-server):
 	* gnus-group.el (gnus-group-make-kiboze-group)
-	(gnus-group-browse-foreign-server): do.
+	(gnus-group-browse-foreign-server):
+	* spam-stat.el (spam-stat-score-buffer): Simplify mapcar usage.
+	Use mapc when appropriate.
 
 2004-04-22  Teodor Zlatanov  <[email protected]>
 
 	FIXME: Make separate entries for each person.
 
 	From Dan Christensen <[email protected]>, [email protected] (Adam
-	Sj,Ax(Bgren), Wes Hardaker <[email protected]>, and Michael Shields
+	Sjøgren), Wes Hardaker <[email protected]>, and Michael Shields
 	<[email protected]>:
 
 	* spam.el (spam-necessary-extra-headers): Get the extra headers we
@@ -11070,14 +11295,14 @@
 	header.
 	(spam-summary-score): Add function to  get a numeric score from the
 	headers.
-	(spam-generic-score): Fixed function doc, was in wrong place.
+	(spam-generic-score): Fix function doc, was in wrong place.
 	(spam-initialize): Take symbols when it's run, and install the
 	extra headers that spam-necessary-extra-headers thinks we need.
 
 2004-04-21  Teodor Zlatanov  <[email protected]>
 
 	* spam.el (spam-summary-prepare-exit): Add logic and message fix.
-	Reported by [email protected] (Johan Bockg,Ae(Brd).
+	Reported by [email protected] (Johan BockgÃ¥rd).
 
 2004-04-17  Jesper Harder  <[email protected]>
 
@@ -11086,8 +11311,8 @@
 	(gnus-article-get-xrefs, gnus-summary-best-group)
 	(gnus-summary-next-article, gnus-summary-enter-digest-group)
 	(gnus-summary-set-bookmark, gnus-offer-save-summaries)
-	(gnus-summary-update-info, gnus-kill-or-deaden-summary): Use
-	with-current-buffer.
+	(gnus-summary-update-info, gnus-kill-or-deaden-summary):
+	Use with-current-buffer.
 
 2004-04-16  Teodor Zlatanov  <[email protected]>
 
@@ -11241,15 +11466,15 @@
 	(gnus-group-list-active): Let the agent store a server's active
 	list if currently plugged.
 
-	* gnus-int.el (gnus-request-delete-group): Use
-	gnus-cache-delete-group and gnus-agent-delete-group to keep the
+	* gnus-int.el (gnus-request-delete-group):
+	Use gnus-cache-delete-group and gnus-agent-delete-group to keep the
 	local disk in sync with the server.
-	(gnus-request-rename-group): Use
-	gnus-cache-rename-group and gnus-agent-rename-group to keep the
+	(gnus-request-rename-group):
+	Use gnus-cache-rename-group and gnus-agent-rename-group to keep the
 	local disk in sync with the server.
 
-	* gnus-start.el (gnus-get-unread-articles): Cosmetic
-	simplification to logic.
+	* gnus-start.el (gnus-get-unread-articles):
+	Cosmetic simplification to logic.
 
 	* gnus-util.el (gnus-rename-file): New function.
 
@@ -12220,7 +12445,7 @@
 
 	* gnus-score.el (gnus-score-edit-all-score): Fix prototype.
 	Invoke gnus-score-mode.  Reported by
-	[email protected] (Johan Bockg,Ae(Brd).
+	[email protected] (Johan BockgÃ¥rd).
 
 	* gnus-range.el (gnus-compress-sequence): Doc fix.  Suggested by
 	Jim Blandy <[email protected]> (tiny change).
@@ -12255,8 +12480,7 @@
 
 2004-01-11  Jesper Harder  <[email protected]>
 
-	* gnus.sum.el (gnus-remove-odd-characters): Don't cons two new
-	strings.
+	* gnus.sum.el (gnus-remove-odd-characters): Don't cons two new strings.
 
 	* mm-util.el (mm-subst-char-in-string): Support inplace.
 
@@ -12265,24 +12489,11 @@
 
 2004-01-10  Jesper Harder  <[email protected]>
 
-	* gnus-start.el (gnus-subscribe-newsgroup, gnus-start-draft-setup)
-	(gnus-group-change-level, gnus-kill-newsgroup)
-	(gnus-check-bogus-newsgroups, gnus-get-unread-articles-in-group)
-	(gnus-get-unread-articles, gnus-make-articles-unread)
-	(gnus-make-ascending-articles-unread): Use accessor
-	macros (gnus-group-entry, gnus-group-unread, gnus-info-marks etc.)
-	to get group information for improved readability.
-
-	* gnus-srvr.el (gnus-browse-unsubscribe-group): do.
-
-	* gnus-soup.el (gnus-soup-group-brew): do.
-
-	* gnus-msg.el (gnus-put-message): do.
-
-	* gnus-move.el (gnus-group-move-group-to-server): do.
-
-	* gnus-kill.el (gnus-batch-score): do.
-
+	* gnus-srvr.el (gnus-browse-unsubscribe-group):
+	* gnus-soup.el (gnus-soup-group-brew):
+	* gnus-msg.el (gnus-put-message):
+	* gnus-move.el (gnus-group-move-group-to-server):
+	* gnus-kill.el (gnus-batch-score):
 	* gnus-group.el (gnus-group-prepare-flat, gnus-group-delete-group)
 	(gnus-group-update-group-line, gnus-group-insert-group-line-info)
 	(gnus-group-update-group, gnus-group-read-group)
@@ -12292,24 +12503,25 @@
 	(gnus-group-sort-by-unread, gnus-group-catchup)
 	(gnus-group-unsubscribe-group, gnus-group-kill-group)
 	(gnus-group-yank-group, gnus-group-set-info)
-	(gnus-group-list-groups): do.
-
-	* gnus.el (gnus-generate-new-group-name): do.
-
-	* gnus-delay.el (gnus-delay-send-queue): do.
-
-	* nnvirtual.el (nnvirtual-catchup-group): do.
-
+	(gnus-group-list-groups):
+	* gnus.el (gnus-generate-new-group-name):
+	* gnus-delay.el (gnus-delay-send-queue):
+	* nnvirtual.el (nnvirtual-catchup-group):
 	* nnkiboze.el (nnkiboze-generate-group, nnkiboze-generate-group):
-	do.
-
 	* gnus-topic.el (gnus-topic-find-groups, gnus-topic-clean-alist)
-	(gnus-group-prepare-topics, gnus-topic-check-topology): do.
-
+	(gnus-group-prepare-topics, gnus-topic-check-topology):
 	* gnus-sum.el (gnus-update-read-articles, gnus-select-newsgroup)
 	(gnus-mark-xrefs-as-read, gnus-compute-read-articles)
 	(gnus-summary-walk-group-buffer, gnus-summary-move-article)
-	(gnus-group-make-articles-read): do.
+	(gnus-group-make-articles-read):
+	* gnus-start.el (gnus-subscribe-newsgroup, gnus-start-draft-setup)
+	(gnus-group-change-level, gnus-kill-newsgroup)
+	(gnus-check-bogus-newsgroups, gnus-get-unread-articles-in-group)
+	(gnus-get-unread-articles, gnus-make-articles-unread)
+	(gnus-make-ascending-articles-unread): Use accessor
+	macros (gnus-group-entry, gnus-group-unread, gnus-info-marks etc.)
+	to get group information for improved readability.
+
 
 2004-01-09  Jesper Harder  <[email protected]>
 
@@ -12576,7 +12788,7 @@
 
 	* nnheaderxm.el: Remove definition of run-at-time.
 
-2004-01-05  Karl Pfl,Ad(Bsterer  <[email protected]>  (tiny change)
+2004-01-05  Karl Pflästerer  <[email protected]>  (tiny change)
 
 	* mml.el (mml-minibuffer-read-disposition): Show attachment type
 	in prompt.
@@ -12895,7 +13107,7 @@
   Boston, MA 02110-1301, USA.
 
 ;; Local Variables:
-;; coding: iso-2022-7bit
+;; coding: utf-8
 ;; fill-column: 79
 ;; add-log-time-zone-rule: t
 ;; End:
Index: gnus/lisp/ChangeLog.1
diff -u gnus/lisp/ChangeLog.1:7.5 gnus/lisp/ChangeLog.1:7.6
--- gnus/lisp/ChangeLog.1:7.5	Fri Oct 13 13:11:25 2006
+++ gnus/lisp/ChangeLog.1	Thu Apr 24 06:28:03 2008
@@ -5482,8 +5482,7 @@
 
 1999-06-09  Markus Rost  <[email protected]>
 
-	* gnus/gnus-group.el (gnus-permanently-visible-groups): Fix custom
-	type.
+	* gnus-group.el (gnus-permanently-visible-groups): Fix custom type.
 
 1999-06-13 05:15:52  Lars Magne Ingebrigtsen  <[email protected]>
 
@@ -6462,7 +6461,7 @@
 
 1999-02-01  Tatsuya Ichikawa  <[email protected]>
 
-	* lisp/mail-source.el : Support APOP authentication scheme.
+	* mail-source.el : Support APOP authentication scheme.
 
 1999-02-02 21:56:14  Tatsuya Ichikawa  <[email protected]>
 
@@ -6845,8 +6844,7 @@
 
 1999-01-13  Kiyokazu SUTO  <[email protected]>
 
-	* lisp/nnspool.el (nnspool-retrieve-headers): Protect against empty
-	body.
+	* nnspool.el (nnspool-retrieve-headers): Protect against empty body.
 
 1999-01-14 21:17:35  Lars Magne Ingebrigtsen  <[email protected]>
 
@@ -9616,9 +9614,9 @@
 
 1998-09-06  Dave Love  <[email protected]>
 
-	* gnus/nnweb.el (require): Wrap requirement of w3 and url in
-	ignore-errors too, eval'd when compile.  Require w3 stuff at load
-	time for nicer failure if it's not available.
+	* nnweb.el (require): Wrap requirement of w3 and url in ignore-errors
+	too, eval'd when compile.  Require w3 stuff at load time for nicer
+	failure if it's not available.
 
 1998-09-08 00:38:39  Lars Magne Ingebrigtsen  <[email protected]>
 
Index: gnus/lisp/ChangeLog.2
diff -u gnus/lisp/ChangeLog.2:7.19 gnus/lisp/ChangeLog.2:7.21
--- gnus/lisp/ChangeLog.2:7.19	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/ChangeLog.2	Thu Apr 24 06:28:03 2008
@@ -4464,22 +4464,22 @@
 	performed by gnus-agent-request-article.
 	* gnus-cus.el (gnus-agent-parameters): New variable.  List of
 	customizable group/topic parameters that regulate the agent.
-	(gnus-group-customize): Uses gnus-agent-parameters.  Replaced
+	(gnus-group-customize): Uses gnus-agent-parameters.  Replace
 	kill-buffer with gnus-kill-buffer to remove the killed buffer from
 	the list of gnus buffers.
 	(gnus-trim-whitespace): Removes leading and trailing whitespace
 	from multiline strings.
-	(gnus-agent-cat-prepare-category-field,
-	gnus-agent-customize-category): Constructs a category
+	(gnus-agent-cat-prepare-category-field)
+	(gnus-agent-customize-category): Constructs a category
 	customization buffer.
-	* gnus-int.el (gnus-retrieve-headers,
-	gnus-request-expire-articles): No longer checks gnus-agent-cache
+	* gnus-int.el (gnus-retrieve-headers)
+	(gnus-request-expire-articles): No longer checks gnus-agent-cache
 	as it is handled internally by the agent.
 	(gnus-request-head, gnus-request-body): Conditional checks
 	surrounding gnus-agent-request-article removed; now performed by
 	gnus-agent-request-article.
 
-	* gnus-start.el (): Added defvar statements to resolve compilation
+	* gnus-start.el (): Add defvar statements to resolve compilation
 	warnings.
 	(gnus-long-file-names): New function.  Isolates platform dependent
 	msdos-long-file-names.
@@ -4488,17 +4488,17 @@
 	errors when .newsrc.eld is huge.
 	(gnus-save-newsrc-file): Uses new
 	gnus-save-startup-file-via-temp-buffer.
-	(gnus-gnus-to-quick-newsrc-format): Rewritten to write to
+	(gnus-gnus-to-quick-newsrc-format): Rewrite to write to
 	standard-output.
-	(gnus-display-time-event-handler): Changed to alias from a defun
+	(gnus-display-time-event-handler): Change to alias from a defun
 	to avoid a compile-time warning when display-time-event-handler is
 	not defined.
-	* gnus-util.el (gnus-with-output-to-file): New macro.  Binds
-	standard-output such that prin1 and princ will write directly to a
-	file.
+	* gnus-util.el (gnus-with-output-to-file): New macro.
+	Binds standard-output such that prin1 and princ will write directly
+	to a file.
 
-	* gnus.el (gnus-agent-cache): Expanded documentation.
-	(gnus-summary-high-undownloaded-face): Removed second bold keyword
+	* gnus.el (gnus-agent-cache): Expand documentation.
+	(gnus-summary-high-undownloaded-face): Remove second bold keyword
 	so that this face is actually bold.
 
 	* nnkiboze.el (nnkiboze-request-article): Only use the cache when
@@ -9162,8 +9162,8 @@
 
 2002-04-19  Jesper Harder  <[email protected]>
 
-	* nnkiboze.el (nnkiboze-request-scan): Call
-	nnkiboze-possibly-change-group.
+	* nnkiboze.el (nnkiboze-request-scan):
+	Call nnkiboze-possibly-change-group.
 	(nnkiboze-generate-group): Use mm-with-unibyte to avoid encoding
 	problems.
 	(nnkiboze-generate-group): Set newsrc to the *highest* article
@@ -16694,7 +16694,7 @@
 	(message-distribution-function, message-auto-save-directory): Fix
 	:type.
 
-	* gnus/mml.el (mml-parse-1): Frob mml-confirmation-set when
+	* mml.el (mml-parse-1): Frob mml-confirmation-set when
 	proceeding after warnings.  Amend multipart warning message.
 
 2001-01-04  Dave Love  <[email protected]>
Index: gnus/lisp/auth-source.el
diff -u gnus/lisp/auth-source.el:7.5 gnus/lisp/auth-source.el:7.6
--- gnus/lisp/auth-source.el:7.5	Wed Apr  9 22:16:17 2008
+++ gnus/lisp/auth-source.el	Fri Apr 25 20:42:18 2008
@@ -86,11 +86,6 @@
 		 (list :tag "Source definition"
 		       (const :format "" :value :source)
 		       (string :tag "Authentication Source")
-		       (const :format "" :value :server)
-		       (choice :tag "Server (logical name) choice"
-			       (const :tag "Any" t)
-			       (regexp :tag "Server regular expression (TODO)")
-			       (const :tag "Fallback" nil))
 		       (const :format "" :value :host)
 		       (choice :tag "Host (machine) choice"
 			       (const :tag "Any" t)
@@ -118,20 +113,16 @@
 ;; (auth-source-user-or-password-imap "password" "imap.myhost.com")
 ;; (auth-source-protocol-defaults 'imap)
 
-(defun auth-source-pick (server host protocol &optional fallback)
-  "Parse `auth-sources' for SERVER, HOST, and PROTOCOL matches.
+(defun auth-source-pick (host protocol &optional fallback)
+  "Parse `auth-sources' for HOST, and PROTOCOL matches.
 
-Returns fallback choices (where SERVER. PROTOCOL or HOST are nil) with FALLBACK t."
+Returns fallback choices (where PROTOCOL or HOST are nil) with FALLBACK t."
   (interactive "sHost: \nsProtocol: \n") ;for testing
   (let (choices)
     (dolist (choice auth-sources)
-      (let ((s (plist-get choice :server))
-	    (h (plist-get choice :host))
+      (let ((h (plist-get choice :host))
 	    (p (plist-get choice :protocol)))
 	(when (and
-	       (or (equal t s)
-		   (and (stringp s) (string-match s server))
-		   (and fallback (equal s nil)))
 	       (or (equal t h)
 		   (and (stringp h) (string-match h host))
 		   (and fallback (equal h nil)))
@@ -142,12 +133,12 @@
     (if choices
 	choices
       (unless fallback
-	(auth-source-pick server host protocol t)))))
+	(auth-source-pick host protocol t)))))
 
-(defun auth-source-user-or-password (mode server host protocol)
-  "Find user or password (from the string MODE) matching SERVER, HOST, and PROTOCOL."
+(defun auth-source-user-or-password (mode host protocol)
+  "Find user or password (from the string MODE) matching HOST and PROTOCOL."
   (let (found)
-    (dolist (choice (auth-source-pick server host protocol))
+    (dolist (choice (auth-source-pick host protocol))
       (setq found (netrc-machine-user-or-password 
 		   mode
 		   (plist-get choice :source)
@@ -161,20 +152,20 @@
   "Return a list of default ports and names for PROTOCOL."
   (cdr-safe (assoc protocol auth-source-protocols)))
 
-(defun auth-source-user-or-password-imap (mode server host)
-  (auth-source-user-or-password mode server host 'imap))
+(defun auth-source-user-or-password-imap (mode host)
+  (auth-source-user-or-password mode host 'imap))
 
-(defun auth-source-user-or-password-pop3 (mode server host)
-  (auth-source-user-or-password mode server host 'pop3))
+(defun auth-source-user-or-password-pop3 (mode host)
+  (auth-source-user-or-password mode host 'pop3))
 
-(defun auth-source-user-or-password-ssh (mode server host)
-  (auth-source-user-or-password mode server host 'ssh))
+(defun auth-source-user-or-password-ssh (mode host)
+  (auth-source-user-or-password mode host 'ssh))
 
-(defun auth-source-user-or-password-sftp (mode server host)
-  (auth-source-user-or-password mode server host 'sftp))
+(defun auth-source-user-or-password-sftp (mode host)
+  (auth-source-user-or-password mode host 'sftp))
 
-(defun auth-source-user-or-password-smtp (mode server host)
-  (auth-source-user-or-password mode server host 'smtp))
+(defun auth-source-user-or-password-smtp (mode host)
+  (auth-source-user-or-password mode host 'smtp))
 
 (provide 'auth-source)
 
Index: gnus/lisp/binhex.el
diff -u gnus/lisp/binhex.el:7.13 gnus/lisp/binhex.el:7.14
--- gnus/lisp/binhex.el:7.13	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/binhex.el	Thu Apr 24 06:19:21 2008
@@ -222,8 +222,8 @@
 	(save-excursion
 	  (goto-char start)
 	  (when (re-search-forward binhex-begin-line end t)
-	    (let (default-enable-multibyte-characters)
-	      (setq work-buffer (generate-new-buffer " *binhex-work*")))
+            (setq work-buffer (generate-new-buffer " *binhex-work*"))
+            (with-current-buffer work-buffer (set-buffer-multibyte nil))
 	    (beginning-of-line)
 	    (setq bits 0 counter 0)
 	    (while tmp
@@ -329,5 +329,5 @@
 
 (provide 'binhex)
 
-;;; arch-tag: 8476badd-1e76-4f1d-a640-f9a38c72eed8
+;; arch-tag: 8476badd-1e76-4f1d-a640-f9a38c72eed8
 ;;; binhex.el ends here
Index: gnus/lisp/canlock.el
diff -u gnus/lisp/canlock.el:7.17 gnus/lisp/canlock.el:7.18
--- gnus/lisp/canlock.el:7.17	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/canlock.el	Thu Apr 24 06:19:20 2008
@@ -249,5 +249,5 @@
 
 (provide 'canlock)
 
-;;; arch-tag: 033c4f09-b9f1-459d-bd0d-254430283f78
+;; arch-tag: 033c4f09-b9f1-459d-bd0d-254430283f78
 ;;; canlock.el ends here
Index: gnus/lisp/compface.el
diff -u gnus/lisp/compface.el:7.16 gnus/lisp/compface.el:7.17
--- gnus/lisp/compface.el:7.16	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/compface.el	Thu Apr 24 06:19:21 2008
@@ -33,6 +33,7 @@
 GNU/Linux system these might be in packages with names like `compface'
 or `faces-xface' and `netpbm' or `libgr-progs', for instance."
   (with-temp-buffer
+    (unless (featurep 'xemacs) (set-buffer-multibyte nil))
     (insert face)
     (let ((coding-system-for-read 'raw-text)
 	  ;; At least "icontopbm" doesn't work with Windows because
@@ -59,5 +60,5 @@
 
 (provide 'compface)
 
-;;; arch-tag: f9c78e84-98c0-4142-9682-8ba4cf4c3441
+;; arch-tag: f9c78e84-98c0-4142-9682-8ba4cf4c3441
 ;;; compface.el ends here
Index: gnus/lisp/deuglify.el
diff -u gnus/lisp/deuglify.el:7.18 gnus/lisp/deuglify.el:7.19
--- gnus/lisp/deuglify.el:7.18	Sun Feb 24 16:39:37 2008
+++ gnus/lisp/deuglify.el	Thu Apr 24 06:19:21 2008
@@ -478,5 +478,5 @@
 ;; coding: iso-8859-1
 ;; End:
 
-;;; arch-tag: 5f895cc9-51a9-487c-b42e-28844d79eb73
+;; arch-tag: 5f895cc9-51a9-487c-b42e-28844d79eb73
 ;;; deuglify.el ends here
Index: gnus/lisp/dig.el
diff -u gnus/lisp/dig.el:7.11 gnus/lisp/dig.el:7.12
--- gnus/lisp/dig.el:7.11	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/dig.el	Thu Apr 24 06:19:20 2008
@@ -192,5 +192,5 @@
 
 (provide 'dig)
 
-;;; arch-tag: 1d61726e-9400-4013-9ae7-4035e0c7f7d6
+;; arch-tag: 1d61726e-9400-4013-9ae7-4035e0c7f7d6
 ;;; dig.el ends here
Index: gnus/lisp/dns.el
diff -u gnus/lisp/dns.el:7.21 gnus/lisp/dns.el:7.22
--- gnus/lisp/dns.el:7.21	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/dns.el	Thu Apr 24 06:19:21 2008
@@ -102,11 +102,11 @@
   (dns-write-bytes 0))
 
 (defun dns-read-string-name (string buffer)
-  (let (default-enable-multibyte-characters)
-    (with-temp-buffer
-      (insert string)
-      (goto-char (point-min))
-      (dns-read-name buffer))))
+  (with-temp-buffer
+    (set-buffer-multibyte nil)
+    (insert string)
+    (goto-char (point-min))
+    (dns-read-name buffer)))
 
 (defun dns-read-name (&optional buffer)
   (let ((ended nil)
@@ -137,6 +137,7 @@
   "Write a DNS packet according to SPEC.
 If TCP-P, the first two bytes of the package with be the length field."
   (with-temp-buffer
+    (set-buffer-multibyte nil)
     (dns-write-bytes (dns-get 'id spec) 2)
     (dns-write-bytes
      (logior
@@ -186,72 +187,72 @@
     (buffer-string)))
 
 (defun dns-read (packet)
-  (let (default-enable-multibyte-characters)
-    (with-temp-buffer
-      (let ((spec nil)
-            queries answers authorities additionals)
-        (insert packet)
-        (goto-char (point-min))
-        (push (list 'id (dns-read-bytes 2)) spec)
-        (let ((byte (dns-read-bytes 1)))
-          (push (list 'response-p (if (zerop (logand byte (lsh 1 7))) nil t))
-                spec)
-          (let ((opcode (logand byte (lsh 7 3))))
-            (push (list 'opcode
-                        (cond ((eq opcode 0) 'query)
-                              ((eq opcode 1) 'inverse-query)
-                              ((eq opcode 2) 'status)))
-                  spec))
-          (push (list 'authoritative-p (if (zerop (logand byte (lsh 1 2)))
-                                           nil t)) spec)
-          (push (list 'truncated-p (if (zerop (logand byte (lsh 1 2))) nil t))
-                spec)
-          (push (list 'recursion-desired-p
-                      (if (zerop (logand byte (lsh 1 0))) nil t)) spec))
-        (let ((rc (logand (dns-read-bytes 1) 15)))
-          (push (list 'response-code
-                      (cond
-                       ((eq rc 0) 'no-error)
-                       ((eq rc 1) 'format-error)
-                       ((eq rc 2) 'server-failure)
-                       ((eq rc 3) 'name-error)
-                       ((eq rc 4) 'not-implemented)
-                       ((eq rc 5) 'refused)))
+  (with-temp-buffer
+    (set-buffer-multibyte nil)
+    (let ((spec nil)
+          queries answers authorities additionals)
+      (insert packet)
+      (goto-char (point-min))
+      (push (list 'id (dns-read-bytes 2)) spec)
+      (let ((byte (dns-read-bytes 1)))
+        (push (list 'response-p (if (zerop (logand byte (lsh 1 7))) nil t))
+              spec)
+        (let ((opcode (logand byte (lsh 7 3))))
+          (push (list 'opcode
+                      (cond ((eq opcode 0) 'query)
+                            ((eq opcode 1) 'inverse-query)
+                            ((eq opcode 2) 'status)))
                 spec))
-        (setq queries (dns-read-bytes 2))
-        (setq answers (dns-read-bytes 2))
-        (setq authorities (dns-read-bytes 2))
-        (setq additionals (dns-read-bytes 2))
-        (let ((qs nil))
-          (dotimes (i queries)
+        (push (list 'authoritative-p (if (zerop (logand byte (lsh 1 2)))
+                                         nil t)) spec)
+        (push (list 'truncated-p (if (zerop (logand byte (lsh 1 2))) nil t))
+              spec)
+        (push (list 'recursion-desired-p
+                    (if (zerop (logand byte (lsh 1 0))) nil t)) spec))
+      (let ((rc (logand (dns-read-bytes 1) 15)))
+        (push (list 'response-code
+                    (cond
+                     ((eq rc 0) 'no-error)
+                     ((eq rc 1) 'format-error)
+                     ((eq rc 2) 'server-failure)
+                     ((eq rc 3) 'name-error)
+                     ((eq rc 4) 'not-implemented)
+                     ((eq rc 5) 'refused)))
+              spec))
+      (setq queries (dns-read-bytes 2))
+      (setq answers (dns-read-bytes 2))
+      (setq authorities (dns-read-bytes 2))
+      (setq additionals (dns-read-bytes 2))
+      (let ((qs nil))
+        (dotimes (i queries)
+          (push (list (dns-read-name)
+                      (list 'type (dns-inverse-get (dns-read-bytes 2)
+                                                   dns-query-types))
+                      (list 'class (dns-inverse-get (dns-read-bytes 2)
+                                                    dns-classes)))
+                qs))
+        (push (list 'queries qs) spec))
+      (dolist (slot '(answers authorities additionals))
+        (let ((qs nil)
+              type)
+          (dotimes (i (symbol-value slot))
             (push (list (dns-read-name)
-                        (list 'type (dns-inverse-get (dns-read-bytes 2)
-                                                     dns-query-types))
+                        (list 'type
+                              (setq type (dns-inverse-get (dns-read-bytes 2)
+                                                          dns-query-types)))
                         (list 'class (dns-inverse-get (dns-read-bytes 2)
-                                                      dns-classes)))
+                                                      dns-classes))
+                        (list 'ttl (dns-read-bytes 4))
+                        (let ((length (dns-read-bytes 2)))
+                          (list 'data
+                                (dns-read-type
+                                 (buffer-substring
+                                  (point)
+                                  (progn (forward-char length) (point)))
+                                 type))))
                   qs))
-          (push (list 'queries qs) spec))
-        (dolist (slot '(answers authorities additionals))
-          (let ((qs nil)
-                type)
-            (dotimes (i (symbol-value slot))
-              (push (list (dns-read-name)
-                          (list 'type
-                                (setq type (dns-inverse-get (dns-read-bytes 2)
-                                                            dns-query-types)))
-                          (list 'class (dns-inverse-get (dns-read-bytes 2)
-                                                        dns-classes))
-                          (list 'ttl (dns-read-bytes 4))
-                          (let ((length (dns-read-bytes 2)))
-                            (list 'data
-                                  (dns-read-type
-                                   (buffer-substring
-                                    (point)
-                                    (progn (forward-char length) (point)))
-                                   type))))
-                    qs))
-            (push (list slot qs) spec)))
-        (nreverse spec)))))
+          (push (list slot qs) spec)))
+      (nreverse spec))))
 
 (defun dns-read-int32 ()
   ;; Full 32 bit Integers can't be handled by Emacs.  If we use
@@ -263,40 +264,40 @@
   (let ((buffer (current-buffer))
 	(point (point)))
     (prog1
-        (let (default-enable-multibyte-characters)
-          (with-temp-buffer
-            (insert string)
-            (goto-char (point-min))
-            (cond
-             ((eq type 'A)
-              (let ((bytes nil))
-                (dotimes (i 4)
-                  (push (dns-read-bytes 1) bytes))
-                (mapconcat 'number-to-string (nreverse bytes) ".")))
-             ((eq type 'AAAA)
-              (let (hextets)
-                (dotimes (i 8)
-                  (push (dns-read-bytes 2) hextets))
-                (mapconcat (lambda (n) (format "%x" n))
-                           (nreverse hextets) ":")))
-             ((eq type 'SOA)
-              (list (list 'mname (dns-read-name buffer))
-                    (list 'rname (dns-read-name buffer))
-                    (list 'serial (dns-read-int32))
-                    (list 'refresh (dns-read-int32))
-                    (list 'retry (dns-read-int32))
-                    (list 'expire (dns-read-int32))
-                    (list 'minimum (dns-read-int32))))
-             ((eq type 'SRV)
-              (list (list 'priority (dns-read-bytes 2))
-                    (list 'weight (dns-read-bytes 2))
-                    (list 'port (dns-read-bytes 2))
-                    (list 'target (dns-read-name buffer))))
-             ((eq type 'MX)
-              (cons (dns-read-bytes 2) (dns-read-name buffer)))
-             ((or (eq type 'CNAME) (eq type 'NS) (eq type 'PTR))
-              (dns-read-string-name string buffer))
-             (t string))))
+        (with-temp-buffer
+          (set-buffer-multibyte nil)
+          (insert string)
+          (goto-char (point-min))
+          (cond
+           ((eq type 'A)
+            (let ((bytes nil))
+              (dotimes (i 4)
+                (push (dns-read-bytes 1) bytes))
+              (mapconcat 'number-to-string (nreverse bytes) ".")))
+           ((eq type 'AAAA)
+            (let (hextets)
+              (dotimes (i 8)
+                (push (dns-read-bytes 2) hextets))
+              (mapconcat (lambda (n) (format "%x" n))
+                         (nreverse hextets) ":")))
+           ((eq type 'SOA)
+            (list (list 'mname (dns-read-name buffer))
+                  (list 'rname (dns-read-name buffer))
+                  (list 'serial (dns-read-int32))
+                  (list 'refresh (dns-read-int32))
+                  (list 'retry (dns-read-int32))
+                  (list 'expire (dns-read-int32))
+                  (list 'minimum (dns-read-int32))))
+           ((eq type 'SRV)
+            (list (list 'priority (dns-read-bytes 2))
+                  (list 'weight (dns-read-bytes 2))
+                  (list 'port (dns-read-bytes 2))
+                  (list 'target (dns-read-name buffer))))
+           ((eq type 'MX)
+            (cons (dns-read-bytes 2) (dns-read-name buffer)))
+           ((or (eq type 'CNAME) (eq type 'NS) (eq type 'PTR))
+            (dns-read-string-name string buffer))
+           (t string)))
       (goto-char point))))
 
 (defun dns-parse-resolv-conf ()
@@ -378,53 +379,53 @@
 
   (if (not dns-servers)
       (message "No DNS server configuration found")
-    (let (default-enable-multibyte-characters)
-      (with-temp-buffer
-        (let ((process (condition-case ()
-                           (dns-make-network-process (car dns-servers))
-                         (error
-                          (message
-                           "dns: Got an error while trying to talk to %s"
-                           (car dns-servers))
-                          nil)))
-              (tcp-p (and (not (fboundp 'make-network-process))
-                          (not (featurep 'xemacs))))
-              (step 100)
-              (times (* dns-timeout 1000))
-              (id (random 65000)))
-          (when process
-            (process-send-string
-             process
-             (dns-write `((id ,id)
-                          (opcode query)
-                          (queries ((,name (type ,type))))
-                          (recursion-desired-p t))
-                        tcp-p))
-            (while (and (zerop (buffer-size))
-                        (> times 0))
-              (sit-for (/ step 1000.0))
-              (accept-process-output process 0 step)
-              (setq times (- times step)))
-            (condition-case nil
-                (delete-process process)
-              (error nil))
-            (when (and tcp-p
-                       (>= (buffer-size) 2))
-              (goto-char (point-min))
-              (delete-region (point) (+ (point) 2)))
-            (when (and (>= (buffer-size) 2)
-                       ;; We had a time-out.
-                       (> times 0))
-              (let ((result (dns-read (buffer-string))))
-                (if fullp
-                    result
-                  (let ((answer (car (dns-get 'answers result))))
-                    (when (eq type (dns-get 'type answer))
-                      (if (eq type 'TXT)
-                          (dns-get-txt-answer (dns-get 'answers result))
-                        (dns-get 'data answer)))))))))))))
+    (with-temp-buffer
+      (set-buffer-multibyte nil)
+      (let ((process (condition-case ()
+                         (dns-make-network-process (car dns-servers))
+                       (error
+                        (message
+                         "dns: Got an error while trying to talk to %s"
+                         (car dns-servers))
+                        nil)))
+            (tcp-p (and (not (fboundp 'make-network-process))
+                        (not (featurep 'xemacs))))
+            (step 100)
+            (times (* dns-timeout 1000))
+            (id (random 65000)))
+        (when process
+          (process-send-string
+           process
+           (dns-write `((id ,id)
+                        (opcode query)
+                        (queries ((,name (type ,type))))
+                        (recursion-desired-p t))
+                      tcp-p))
+          (while (and (zerop (buffer-size))
+                      (> times 0))
+            (sit-for (/ step 1000.0))
+            (accept-process-output process 0 step)
+            (setq times (- times step)))
+          (condition-case nil
+              (delete-process process)
+            (error nil))
+          (when (and tcp-p
+                     (>= (buffer-size) 2))
+            (goto-char (point-min))
+            (delete-region (point) (+ (point) 2)))
+          (when (and (>= (buffer-size) 2)
+                     ;; We had a time-out.
+                     (> times 0))
+            (let ((result (dns-read (buffer-string))))
+              (if fullp
+                  result
+                (let ((answer (car (dns-get 'answers result))))
+                  (when (eq type (dns-get 'type answer))
+                    (if (eq type 'TXT)
+                        (dns-get-txt-answer (dns-get 'answers result))
+                      (dns-get 'data answer))))))))))))
 
 (provide 'dns)
 
-;;; arch-tag: d0edd0c4-4cce-4538-ae92-06c3356ee80a
+;; arch-tag: d0edd0c4-4cce-4538-ae92-06c3356ee80a
 ;;; dns.el ends here
Index: gnus/lisp/earcon.el
diff -u gnus/lisp/earcon.el:7.8 gnus/lisp/earcon.el:7.9
--- gnus/lisp/earcon.el:7.8	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/earcon.el	Thu Apr 24 06:19:20 2008
@@ -231,5 +231,5 @@
 
 (run-hooks 'earcon-load-hook)
 
-;;; arch-tag: 844dfeea-980c-4ed0-907f-a30bf139691c
+;; arch-tag: 844dfeea-980c-4ed0-907f-a30bf139691c
 ;;; earcon.el ends here
Index: gnus/lisp/flow-fill.el
diff -u gnus/lisp/flow-fill.el:7.23 gnus/lisp/flow-fill.el:7.24
--- gnus/lisp/flow-fill.el:7.23	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/flow-fill.el	Thu Apr 24 06:19:20 2008
@@ -223,5 +223,5 @@
 
 (provide 'flow-fill)
 
-;;; arch-tag: addc0040-bc53-4f17-b4bc-1eb44eed6f0b
+;; arch-tag: addc0040-bc53-4f17-b4bc-1eb44eed6f0b
 ;;; flow-fill.el ends here
Index: gnus/lisp/format-spec.el
diff -u gnus/lisp/format-spec.el:7.11 gnus/lisp/format-spec.el:7.12
--- gnus/lisp/format-spec.el:7.11	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/format-spec.el	Thu Apr 24 06:19:21 2008
@@ -78,5 +78,5 @@
 
 (provide 'format-spec)
 
-;;; arch-tag: c22d49cf-d167-445d-b7f1-2504d4173f53
+;; arch-tag: c22d49cf-d167-445d-b7f1-2504d4173f53
 ;;; format-spec.el ends here
Index: gnus/lisp/gnus-agent.el
diff -u gnus/lisp/gnus-agent.el:7.77 gnus/lisp/gnus-agent.el:7.78
--- gnus/lisp/gnus-agent.el:7.77	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/gnus-agent.el	Thu Apr 24 06:19:21 2008
@@ -4226,5 +4226,5 @@
 
 (provide 'gnus-agent)
 
-;;; arch-tag: b0ba4afc-5229-4cee-ad25-9956daa4e91e
+;; arch-tag: b0ba4afc-5229-4cee-ad25-9956daa4e91e
 ;;; gnus-agent.el ends here
Index: gnus/lisp/gnus-art.el
diff -u gnus/lisp/gnus-art.el:7.271 gnus/lisp/gnus-art.el:7.272
--- gnus/lisp/gnus-art.el:7.271	Fri Mar 21 21:19:40 2008
+++ gnus/lisp/gnus-art.el	Thu Apr 24 06:19:20 2008
@@ -1703,11 +1703,6 @@
 
 (defvar gnus-save-article-buffer nil)
 
-(defvar gnus-article-mode-line-format-alist
-  (nconc '((?w (gnus-article-wash-status) ?s)
-	   (?m (gnus-article-mime-part-status) ?s))
-	 gnus-summary-mode-line-format-alist))
-
 (defvar gnus-number-of-articles-to-be-saved nil)
 
 (defvar gnus-inhibit-hiding nil)
@@ -4790,10 +4785,9 @@
   ;; Useful if file has already been saved to disk
   (interactive
    (list
-    (mm-with-multibyte
-      (read-file-name "Replace MIME part with file: "
-		      (or mm-default-directory default-directory)
-		      nil nil))))
+    (read-file-name "Replace MIME part with file: "
+                    (or mm-default-directory default-directory)
+                    nil nil)))
   (gnus-mime-save-part-and-strip file))
 
 (defun gnus-mime-save-part-and-strip (&optional file)
@@ -6591,7 +6585,13 @@
 		 (with-current-buffer gnus-original-article-buffer
 		   (and (equal (car gnus-original-article) group)
 			(eq (cdr gnus-original-article) article))))
-	    (insert-buffer-substring gnus-original-article-buffer)
+            ;; `insert-buffer-substring' would incorrectly use the
+            ;; equivalent of string-make-multibyte which amount to decoding
+            ;; with locale-coding-system, causing failure of
+            ;; subsequent decoding.
+            (insert (mm-string-to-multibyte
+                     (with-current-buffer gnus-original-article-buffer
+                       (buffer-substring (point-min) (point-max)))))
 	    'article)
 	   ;; Check the backlog.
 	   ((and gnus-keep-backlog
Index: gnus/lisp/gnus-async.el
diff -u gnus/lisp/gnus-async.el:7.14 gnus/lisp/gnus-async.el:7.15
--- gnus/lisp/gnus-async.el:7.14	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/gnus-async.el	Thu Apr 24 06:19:20 2008
@@ -374,5 +374,5 @@
 
 (provide 'gnus-async)
 
-;;; arch-tag: fee61de5-3ea2-4de6-8578-2f90ce89391d
+;; arch-tag: fee61de5-3ea2-4de6-8578-2f90ce89391d
 ;;; gnus-async.el ends here
Index: gnus/lisp/gnus-audio.el
diff -u gnus/lisp/gnus-audio.el:7.9 gnus/lisp/gnus-audio.el:7.10
--- gnus/lisp/gnus-audio.el:7.9	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/gnus-audio.el	Thu Apr 24 06:19:21 2008
@@ -148,5 +148,5 @@
 
 (run-hooks 'gnus-audio-load-hook)
 
-;;; arch-tag: 6f129e78-3416-4fc9-973f-6cf5ac8d654b
+;; arch-tag: 6f129e78-3416-4fc9-973f-6cf5ac8d654b
 ;;; gnus-audio.el ends here
Index: gnus/lisp/gnus-bcklg.el
diff -u gnus/lisp/gnus-bcklg.el:7.8 gnus/lisp/gnus-bcklg.el:7.9
--- gnus/lisp/gnus-bcklg.el:7.8	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/gnus-bcklg.el	Thu Apr 24 06:19:20 2008
@@ -161,5 +161,5 @@
 
 (provide 'gnus-bcklg)
 
-;;; arch-tag: 66259e56-505a-4bba-8a0d-3552c5b94e39
+;; arch-tag: 66259e56-505a-4bba-8a0d-3552c5b94e39
 ;;; gnus-bcklg.el ends here
Index: gnus/lisp/gnus-bookmark.el
diff -u gnus/lisp/gnus-bookmark.el:7.14 gnus/lisp/gnus-bookmark.el:7.15
--- gnus/lisp/gnus-bookmark.el:7.14	Sun Mar  2 17:53:18 2008
+++ gnus/lisp/gnus-bookmark.el	Thu Apr 24 06:19:20 2008
@@ -215,13 +215,13 @@
       (setq gnus-bookmark-alist
 	    (cons
 	     (list (gnus-bookmark-remove-properties bmk-name)
-		   (gnus-bookmark-make-cell
+		   (gnus-bookmark-make-record
 		    group message-id author date subject annotation))
 	     gnus-bookmark-alist))))
   (gnus-bookmark-bmenu-surreptitiously-rebuild-list)
   (gnus-bookmark-write-file))
 
-(defun gnus-bookmark-make-cell
+(defun gnus-bookmark-make-record
   (group message-id author date subject annotation)
   "Return the record part of a new bookmark, given GROUP MESSAGE-ID AUTHOR DATE SUBJECT and ANNOTATION."
   (let ((the-record
@@ -296,9 +296,9 @@
   (let* ((bookmark (or bmk-name
 	  (completing-read "Jump to bookmarked article: "
 			   gnus-bookmark-alist)))
-	 (bmk-cell (cadr (assoc bookmark gnus-bookmark-alist)))
-	 (group (cdr (assoc 'group bmk-cell)))
-	 (message-id (cdr (assoc 'message-id bmk-cell))))
+	 (bmk-record (cadr (assoc bookmark gnus-bookmark-alist)))
+	 (group (cdr (assoc 'group bmk-record)))
+	 (message-id (cdr (assoc 'message-id bmk-record))))
     (when group
       (unless (get-buffer gnus-group-buffer)
 	(gnus-no-server))
Index: gnus/lisp/gnus-cache.el
diff -u gnus/lisp/gnus-cache.el:7.25 gnus/lisp/gnus-cache.el:7.26
--- gnus/lisp/gnus-cache.el:7.25	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/gnus-cache.el	Thu Apr 24 06:19:21 2008
@@ -920,5 +920,5 @@
 
 (provide 'gnus-cache)
 
-;;; arch-tag: 05a79442-8c58-4e65-bd0a-3cbb1b89a33a
+;; arch-tag: 05a79442-8c58-4e65-bd0a-3cbb1b89a33a
 ;;; gnus-cache.el ends here
Index: gnus/lisp/gnus-cite.el
diff -u gnus/lisp/gnus-cite.el:7.38 gnus/lisp/gnus-cite.el:7.39
--- gnus/lisp/gnus-cite.el:7.38	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/gnus-cite.el	Thu Apr 24 06:19:20 2008
@@ -1238,5 +1238,5 @@
 ;; coding: iso-8859-1
 ;; End:
 
-;;; arch-tag: 1997b044-6067-471e-8c8f-dc903093098a
+;; arch-tag: 1997b044-6067-471e-8c8f-dc903093098a
 ;;; gnus-cite.el ends here
Index: gnus/lisp/gnus-cus.el
diff -u gnus/lisp/gnus-cus.el:7.19 gnus/lisp/gnus-cus.el:7.20
--- gnus/lisp/gnus-cus.el:7.19	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/gnus-cus.el	Thu Apr 24 06:19:20 2008
@@ -1120,5 +1120,5 @@
 
 (provide 'gnus-cus)
 
-;;; arch-tag: a37c285a-49bc-4235-8244-804536effeaf
+;; arch-tag: a37c285a-49bc-4235-8244-804536effeaf
 ;;; gnus-cus.el ends here
Index: gnus/lisp/gnus-demon.el
diff -u gnus/lisp/gnus-demon.el:7.16 gnus/lisp/gnus-demon.el:7.17
--- gnus/lisp/gnus-demon.el:7.16	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/gnus-demon.el	Thu Apr 24 06:19:20 2008
@@ -321,5 +321,5 @@
 
 (provide 'gnus-demon)
 
-;;; arch-tag: 8dd5cd3d-6ae4-46b4-9b15-f5fca09fd392
+;; arch-tag: 8dd5cd3d-6ae4-46b4-9b15-f5fca09fd392
 ;;; gnus-demon.el ends here
Index: gnus/lisp/gnus-diary.el
diff -u gnus/lisp/gnus-diary.el:7.18 gnus/lisp/gnus-diary.el:7.20
--- gnus/lisp/gnus-diary.el:7.18	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/gnus-diary.el	Thu Apr 24 06:19:20 2008
@@ -390,8 +390,8 @@
 (add-hook 'nndiary-request-accept-article-hooks
 	  (lambda () (gnus-diary-check-message nil)))
 
-(define-key message-mode-map "\C-cDc" 'gnus-diary-check-message)
-(define-key gnus-article-edit-mode-map "\C-cDc" 'gnus-diary-check-message)
+(define-key message-mode-map "\C-c\C-fd" 'gnus-diary-check-message)
+(define-key gnus-article-edit-mode-map "\C-c\C-fd" 'gnus-diary-check-message)
 
 
 ;; The end ==================================================================
@@ -401,11 +401,7 @@
   (interactive)
   (message "NNDiary version %s" nndiary-version))
 
-(define-key message-mode-map "\C-cDv" 'gnus-diary-version)
-(define-key gnus-article-edit-mode-map "\C-cDv" 'gnus-diary-version)
-
-
 (provide 'gnus-diary)
 
-;;; arch-tag: 98467e70-337e-4ddc-b92d-45d403ff1b4b
+;; arch-tag: 98467e70-337e-4ddc-b92d-45d403ff1b4b
 ;;; gnus-diary.el ends here
Index: gnus/lisp/gnus-dired.el
diff -u gnus/lisp/gnus-dired.el:7.11 gnus/lisp/gnus-dired.el:7.12
--- gnus/lisp/gnus-dired.el:7.11	Sat Mar  1 02:48:13 2008
+++ gnus/lisp/gnus-dired.el	Thu Apr 24 06:19:20 2008
@@ -258,5 +258,5 @@
 
 (provide 'gnus-dired)
 
-;;; arch-tag: 44737731-e445-4638-a31e-713c7590ec76
+;; arch-tag: 44737731-e445-4638-a31e-713c7590ec76
 ;;; gnus-dired.el ends here
Index: gnus/lisp/gnus-draft.el
diff -u gnus/lisp/gnus-draft.el:7.20 gnus/lisp/gnus-draft.el:7.21
--- gnus/lisp/gnus-draft.el:7.20	Sat Mar  1 02:48:13 2008
+++ gnus/lisp/gnus-draft.el	Thu Apr 24 06:19:21 2008
@@ -329,5 +329,5 @@
 
 (provide 'gnus-draft)
 
-;;; arch-tag: 3d92af58-8c97-4a5c-9db4-a98e85198022
+;; arch-tag: 3d92af58-8c97-4a5c-9db4-a98e85198022
 ;;; gnus-draft.el ends here
Index: gnus/lisp/gnus-dup.el
diff -u gnus/lisp/gnus-dup.el:7.11 gnus/lisp/gnus-dup.el:7.12
--- gnus/lisp/gnus-dup.el:7.11	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/gnus-dup.el	Thu Apr 24 06:19:21 2008
@@ -161,5 +161,5 @@
 
 (provide 'gnus-dup)
 
-;;; arch-tag: 903e94db-7b00-4d19-83ee-cf34a81fa5fb
+;; arch-tag: 903e94db-7b00-4d19-83ee-cf34a81fa5fb
 ;;; gnus-dup.el ends here
Index: gnus/lisp/gnus-eform.el
diff -u gnus/lisp/gnus-eform.el:7.11 gnus/lisp/gnus-eform.el:7.12
--- gnus/lisp/gnus-eform.el:7.11	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/gnus-eform.el	Thu Apr 24 06:19:21 2008
@@ -132,5 +132,5 @@
 
 (provide 'gnus-eform)
 
-;;; arch-tag: ef50678c-2c28-49ef-affc-e53b3b2c0bf6
+;; arch-tag: ef50678c-2c28-49ef-affc-e53b3b2c0bf6
 ;;; gnus-eform.el ends here
Index: gnus/lisp/gnus-ems.el
diff -u gnus/lisp/gnus-ems.el:7.25 gnus/lisp/gnus-ems.el:7.26
--- gnus/lisp/gnus-ems.el:7.25	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/gnus-ems.el	Thu Apr 24 06:19:20 2008
@@ -162,6 +162,7 @@
   mark-active) ; aliased to region-exists-p in XEmacs.
 
 (autoload 'gnus-alive-p "gnus-util")
+(autoload 'mm-disable-multibyte "mm-util")
 
 (defun gnus-x-splash ()
   "Show a splash screen using a pixmap in the current buffer."
@@ -179,9 +180,9 @@
     (sit-for 0) ;; Necessary for measuring the window size correctly.
     (when (and file
 	       (ignore-errors
-		(let ((coding-system-for-read 'raw-text)
-		      default-enable-multibyte-characters)
+		(let ((coding-system-for-read 'raw-text))
 		  (with-temp-buffer
+                    (mm-disable-multibyte)
 		    (insert-file-contents file)
 		    (goto-char (point-min))
 		    (setq pixmap (read (current-buffer)))))))
@@ -307,5 +308,5 @@
 
 (provide 'gnus-ems)
 
-;;; arch-tag: e7360b45-14b5-4171-aa39-69a44aed3cdb
+;; arch-tag: e7360b45-14b5-4171-aa39-69a44aed3cdb
 ;;; gnus-ems.el ends here
Index: gnus/lisp/gnus-fun.el
diff -u gnus/lisp/gnus-fun.el:7.21 gnus/lisp/gnus-fun.el:7.22
--- gnus/lisp/gnus-fun.el:7.21	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/gnus-fun.el	Thu Apr 24 06:19:20 2008
@@ -217,8 +217,7 @@
 (defun gnus-display-x-face-in-from (data)
   "Display the X-Face DATA in the From header."
   (require 'gnus-art)
-  (let ((default-enable-multibyte-characters nil)
-	pbm)
+  (let (pbm)
     (when (or (gnus-image-type-available-p 'xface)
 	      (and (gnus-image-type-available-p 'pbm)
 		   (setq pbm (uncompface data))))
@@ -293,5 +292,5 @@
 
 (provide 'gnus-fun)
 
-;;; arch-tag: 9d000a69-15cc-4491-9dc0-4627484f50c1
+;; arch-tag: 9d000a69-15cc-4491-9dc0-4627484f50c1
 ;;; gnus-fun.el ends here
Index: gnus/lisp/gnus-group.el
diff -u gnus/lisp/gnus-group.el:7.112 gnus/lisp/gnus-group.el:7.113
--- gnus/lisp/gnus-group.el:7.112	Mon Mar 24 19:10:58 2008
+++ gnus/lisp/gnus-group.el	Thu Apr 24 06:19:20 2008
@@ -1188,8 +1188,8 @@
       (goto-char (point-min))
       (setq gnus-group-mark-positions
 	    (list (cons 'process (and (search-forward
-				       (mm-string-as-multibyte "\200") nil t)
-				      (- (point) 2))))))))
+				       (mm-string-to-multibyte "\200") nil t)
+				      (- (point) (point-min) 1))))))))
 
 (defun gnus-mouse-pick-group (e)
   "Enter the group under the mouse pointer."
@@ -4791,5 +4791,5 @@
 
 (provide 'gnus-group)
 
-;;; arch-tag: 2eb5440f-0bca-4091-814c-e37817536af6
+;; arch-tag: 2eb5440f-0bca-4091-814c-e37817536af6
 ;;; gnus-group.el ends here
Index: gnus/lisp/gnus-int.el
diff -u gnus/lisp/gnus-int.el:7.27 gnus/lisp/gnus-int.el:7.28
--- gnus/lisp/gnus-int.el:7.27	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/gnus-int.el	Thu Apr 24 06:19:21 2008
@@ -718,5 +718,5 @@
 
 (provide 'gnus-int)
 
-;;; arch-tag: bbc90087-9b7f-4017-a92c-3abf180ac86d
+;; arch-tag: bbc90087-9b7f-4017-a92c-3abf180ac86d
 ;;; gnus-int.el ends here
Index: gnus/lisp/gnus-kill.el
diff -u gnus/lisp/gnus-kill.el:7.13 gnus/lisp/gnus-kill.el:7.14
--- gnus/lisp/gnus-kill.el:7.13	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/gnus-kill.el	Thu Apr 24 06:19:20 2008
@@ -717,5 +717,5 @@
 
 (provide 'gnus-kill)
 
-;;; arch-tag: b30c0f53-df1a-490b-b81e-17b13474f395
+;; arch-tag: b30c0f53-df1a-490b-b81e-17b13474f395
 ;;; gnus-kill.el ends here
Index: gnus/lisp/gnus-logic.el
diff -u gnus/lisp/gnus-logic.el:7.8 gnus/lisp/gnus-logic.el:7.9
--- gnus/lisp/gnus-logic.el:7.8	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/gnus-logic.el	Thu Apr 24 06:19:20 2008
@@ -228,5 +228,5 @@
 
 (provide 'gnus-logic)
 
-;;; arch-tag: 9651a100-4a59-4b69-a55b-e511e67c0f8d
+;; arch-tag: 9651a100-4a59-4b69-a55b-e511e67c0f8d
 ;;; gnus-logic.el ends here
Index: gnus/lisp/gnus-mh.el
diff -u gnus/lisp/gnus-mh.el:7.10 gnus/lisp/gnus-mh.el:7.11
--- gnus/lisp/gnus-mh.el:7.10	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/gnus-mh.el	Thu Apr 24 06:19:20 2008
@@ -111,5 +111,5 @@
 
 (provide 'gnus-mh)
 
-;;; arch-tag: 2d5696d3-b363-48e5-8749-c256be56acca
+;; arch-tag: 2d5696d3-b363-48e5-8749-c256be56acca
 ;;; gnus-mh.el ends here
Index: gnus/lisp/gnus-ml.el
diff -u gnus/lisp/gnus-ml.el:7.12 gnus/lisp/gnus-ml.el:7.13
--- gnus/lisp/gnus-ml.el:7.12	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/gnus-ml.el	Thu Apr 24 06:19:20 2008
@@ -180,5 +180,5 @@
 
 (provide 'gnus-ml)
 
-;;; arch-tag: 936c0fe6-acce-4c16-87d0-eded88078896
+;; arch-tag: 936c0fe6-acce-4c16-87d0-eded88078896
 ;;; gnus-ml.el ends here
Index: gnus/lisp/gnus-mlspl.el
diff -u gnus/lisp/gnus-mlspl.el:7.10 gnus/lisp/gnus-mlspl.el:7.11
--- gnus/lisp/gnus-mlspl.el:7.10	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/gnus-mlspl.el	Thu Apr 24 06:19:20 2008
@@ -229,5 +229,5 @@
 
 (provide 'gnus-mlspl)
 
-;;; arch-tag: 62b3381f-1e45-4b61-be1a-29fb27703322
+;; arch-tag: 62b3381f-1e45-4b61-be1a-29fb27703322
 ;;; gnus-mlspl.el ends here
Index: gnus/lisp/gnus-move.el
diff -u gnus/lisp/gnus-move.el:7.12 gnus/lisp/gnus-move.el:7.13
--- gnus/lisp/gnus-move.el:7.12	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/gnus-move.el	Thu Apr 24 06:19:20 2008
@@ -179,5 +179,5 @@
 
 (provide 'gnus-move)
 
-;;; arch-tag: 503742b8-7d66-4d79-bb31-4a698070707b
+;; arch-tag: 503742b8-7d66-4d79-bb31-4a698070707b
 ;;; gnus-move.el ends here
Index: gnus/lisp/gnus-msg.el
diff -u gnus/lisp/gnus-msg.el:7.65 gnus/lisp/gnus-msg.el:7.66
--- gnus/lisp/gnus-msg.el:7.65	Sat Mar  1 02:48:13 2008
+++ gnus/lisp/gnus-msg.el	Thu Apr 24 06:19:20 2008
@@ -552,8 +552,7 @@
 		       (t nil))))
     (message-add-action
      `(when (gnus-buffer-exists-p ,buffer)
-	(save-excursion
-	  (set-buffer ,buffer)
+	(with-current-buffer ,buffer
 	  ,(when to-be-marked
 	     (if (eq config 'forward)
 		 `(gnus-summary-mark-article-as-forwarded ',to-be-marked)
@@ -588,8 +587,7 @@
 		  ""))
 	  ;; #### see comment in gnus-setup-message -- drv
 	  (gnus-setup-message 'message (message-mail)))
-      (save-excursion
-	(set-buffer buffer)
+      (with-current-buffer buffer
 	(setq gnus-newsgroup-name group)))))
 
 (defun gnus-group-news (&optional arg)
@@ -620,8 +618,7 @@
 	  ;; #### see comment in gnus-setup-message -- drv
 	  (gnus-setup-message 'message
 	    (message-news (gnus-group-real-name gnus-newsgroup-name))))
-      (save-excursion
-	(set-buffer buffer)
+      (with-current-buffer buffer
 	(setq gnus-newsgroup-name group)))))
 
 (defun gnus-group-post-news (&optional arg)
@@ -667,8 +664,7 @@
 		  gnus-newsgroup-name))
 	  ;; #### see comment in gnus-setup-message -- drv
 	  (gnus-setup-message 'message (message-mail)))
-      (save-excursion
-	(set-buffer buffer)
+      (with-current-buffer buffer
 	(setq gnus-newsgroup-name group)))))
 
 (defun gnus-summary-news-other-window (&optional arg)
@@ -704,8 +700,7 @@
 		   (remove
 		    (car (gnus-find-method-for-group gnus-newsgroup-name))
 		    gnus-discouraged-post-methods)))))
-      (save-excursion
-	(set-buffer buffer)
+      (with-current-buffer buffer
 	(setq gnus-newsgroup-name group)))))
 
 (defun gnus-summary-post-news (&optional arg)
@@ -828,8 +823,7 @@
       (push
        `((lambda ()
 	   (when (gnus-buffer-exists-p ,gnus-summary-buffer)
-	     (save-excursion
-	       (set-buffer ,gnus-summary-buffer)
+	     (with-current-buffer ,gnus-summary-buffer
 	       (gnus-cache-possibly-remove-article ,article nil nil nil t)
 	       (gnus-summary-mark-as-read ,article gnus-canceled-mark)))))
        message-send-actions)
@@ -845,16 +839,14 @@
   ;; if ARTICLE-BUFFER is nil, gnus-article-buffer is used
   ;; this buffer should be passed to all mail/news reply/post routines.
   (setq gnus-article-copy (gnus-get-buffer-create " *gnus article copy*"))
-  (save-excursion
-    (set-buffer gnus-article-copy)
+  (with-current-buffer gnus-article-copy
     (mm-enable-multibyte))
   (let ((article-buffer (or article-buffer gnus-article-buffer))
 	end beg)
     (if (not (and (get-buffer article-buffer)
 		  (gnus-buffer-exists-p article-buffer)))
 	(error "Can't find any article buffer")
-      (save-excursion
-	(set-buffer article-buffer)
+      (with-current-buffer article-buffer
 	(let ((gnus-newsgroup-charset (or gnus-article-charset
 					  gnus-newsgroup-charset))
 	      (gnus-newsgroup-ignored-charsets
@@ -1120,8 +1112,7 @@
 	    (gnus-summary-select-article)
 	  (dolist (article very-wide)
 	    (gnus-summary-select-article nil nil nil article)
-	    (save-excursion
-	      (set-buffer (gnus-copy-article-buffer))
+	    (with-current-buffer (gnus-copy-article-buffer)
 	      (gnus-msg-treat-broken-reply-to)
 	      (save-restriction
 		(message-narrow-to-head)
@@ -1144,8 +1135,7 @@
   "Check the various replysign variables and take action accordingly."
   (when (or gnus-message-replysign gnus-message-replyencrypt)
     (let (signed encrypted)
-      (save-excursion
-	(set-buffer gnus-article-buffer)
+      (with-current-buffer gnus-article-buffer
 	(setq signed (memq 'signed gnus-article-wash-types))
 	(setq encrypted (memq 'encrypted gnus-article-wash-types)))
       (cond ((and gnus-message-replyencrypt encrypted)
@@ -1276,8 +1266,7 @@
 	 current-prefix-arg))
   (dolist (article (gnus-summary-work-articles n))
     (gnus-summary-select-article nil nil nil article)
-    (save-excursion
-      (set-buffer gnus-original-article-buffer)
+    (with-current-buffer gnus-original-article-buffer
       (message-resend address))
     (gnus-summary-mark-article-as-forwarded article)))
 
@@ -1484,8 +1473,7 @@
       (insert nntp-server-type))
     (insert "\n\n\n\n\n")
     (let (text)
-      (save-excursion
-	(set-buffer (gnus-get-buffer-create " *gnus environment info*"))
+      (with-current-buffer (gnus-get-buffer-create " *gnus environment info*")
 	(erase-buffer)
 	(gnus-debug)
 	(setq text (buffer-string)))
@@ -1506,8 +1494,7 @@
   (gnus-summary-iterate n
     (let ((gnus-inhibit-treatment t))
       (gnus-summary-select-article))
-    (save-excursion
-      (set-buffer buffer)
+    (with-current-buffer buffer
       (message-yank-buffer gnus-article-buffer))))
 
 (defun gnus-debug ()
@@ -1520,8 +1507,7 @@
     (gnus-message 4 "Please wait while we snoop your variables...")
     (sit-for 0)
     ;; Go through all the files looking for non-default values for variables.
-    (save-excursion
-      (set-buffer (gnus-get-buffer-create " *gnus bug info*"))
+    (with-current-buffer (gnus-get-buffer-create " *gnus bug info*")
       (while files
 	(erase-buffer)
 	(when (and (setq file (locate-library (pop files)))
@@ -1562,7 +1548,7 @@
     ;; Remove any control chars - they seem to cause trouble for some
     ;; mailers.  (Byte-compiled output from the stuff above.)
     (goto-char point)
-    (while (re-search-forward (mm-string-as-multibyte
+    (while (re-search-forward (mm-string-to-multibyte
 			       "[\000-\010\013-\037\200-\237]") nil t)
       (replace-match (format "\\%03o" (string-to-char (match-string 0)))
 		     t t))))
@@ -2000,5 +1986,5 @@
 
 (provide 'gnus-msg)
 
-;;; arch-tag: 9f22b2f5-1c0a-49de-916e-4c88e984852b
+;; arch-tag: 9f22b2f5-1c0a-49de-916e-4c88e984852b
 ;;; gnus-msg.el ends here
Index: gnus/lisp/gnus-nocem.el
diff -u gnus/lisp/gnus-nocem.el:7.13 gnus/lisp/gnus-nocem.el:7.14
--- gnus/lisp/gnus-nocem.el:7.13	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/gnus-nocem.el	Thu Apr 24 06:19:21 2008
@@ -396,5 +396,5 @@
 
 (provide 'gnus-nocem)
 
-;;; arch-tag: 0e0c74ea-2f8e-4f3e-8fff-09f767c1adef
+;; arch-tag: 0e0c74ea-2f8e-4f3e-8fff-09f767c1adef
 ;;; gnus-nocem.el ends here
Index: gnus/lisp/gnus-picon.el
diff -u gnus/lisp/gnus-picon.el:7.13 gnus/lisp/gnus-picon.el:7.14
--- gnus/lisp/gnus-picon.el:7.13	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/gnus-picon.el	Thu Apr 24 06:19:20 2008
@@ -313,5 +313,5 @@
 
 (provide 'gnus-picon)
 
-;;; arch-tag: fe9aede0-1b1b-463a-b4ab-807f98bcb31f
+;; arch-tag: fe9aede0-1b1b-463a-b4ab-807f98bcb31f
 ;;; gnus-picon.el ends here
Index: gnus/lisp/gnus-range.el
diff -u gnus/lisp/gnus-range.el:7.11 gnus/lisp/gnus-range.el:7.12
--- gnus/lisp/gnus-range.el:7.11	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/gnus-range.el	Thu Apr 24 06:19:21 2008
@@ -656,5 +656,5 @@
 
 (provide 'gnus-range)
 
-;;; arch-tag: 4780bdd8-5a15-4aff-be28-18727895b6ad
+;; arch-tag: 4780bdd8-5a15-4aff-be28-18727895b6ad
 ;;; gnus-range.el ends here
Index: gnus/lisp/gnus-registry.el
diff -u gnus/lisp/gnus-registry.el:7.56 gnus/lisp/gnus-registry.el:7.59
--- gnus/lisp/gnus-registry.el:7.56	Tue Apr  8 23:17:29 2008
+++ gnus/lisp/gnus-registry.el	Sat Apr 26 14:54:20 2008
@@ -161,6 +161,17 @@
     (const :tag "Track by subject (Subject: header)" subject)
     (const :tag "Track by sender (From: header)"  sender)))
 
+(defcustom gnus-registry-split-strategy nil
+  "Whether the registry should track extra data about a message.
+The Subject and Sender (From:) headers are currently tracked this
+way."
+  :group 'gnus-registry
+  :type
+  '(choice :tag "Tracking choices"
+	   (const :tag "Only use single choices, discard multiple matches" nil)
+	   (const :tag "Majority of matches wins" majority)
+	   (const :tag "First found wins"  first)))
+
 (defcustom gnus-registry-entry-caching t
   "Whether the registry should cache extra information."
   :group 'gnus-registry
@@ -486,7 +497,7 @@
 	      nnmail-split-fancy-with-parent-ignore-groups
 	    (list nnmail-split-fancy-with-parent-ignore-groups)))
 	 (log-agent "gnus-registry-split-fancy-with-parent")
-	 found)
+	 found found-full)
 
     ;; this is a big if-else statement.  it uses
     ;; gnus-registry-post-process-groups to filter the results after
@@ -507,12 +518,14 @@
 	     log-agent reference refstr group)
 	    (push group found))))
       ;; filter the found groups and return them
+      ;; the found groups are the full groups
       (setq found (gnus-registry-post-process-groups 
-		   "references" refstr found)))
-
+		   "references" refstr found found)))
+     
      ;; else: there were no matches, now try the extra tracking by sender
-     ((and (gnus-registry-track-sender-p) 
-	   sender)
+     ((and (gnus-registry-track-sender-p)
+	   sender
+	   (not (equal sender user-mail-address)))
       (maphash
        (lambda (key value)
 	 (let ((this-sender (cdr
@@ -522,6 +535,7 @@
 		      (equal sender this-sender))
 	     (let ((groups (gnus-registry-fetch-groups key)))
 	       (dolist (group groups)
+		 (push group found-full)
 		 (setq found (append (list group) (delete group found)))))
 	     (push key matches)
 	     (gnus-message
@@ -531,7 +545,9 @@
 	      log-agent sender found matches))))
        gnus-registry-hashtb)
       ;; filter the found groups and return them
-      (setq found (gnus-registry-post-process-groups "sender" sender found)))
+      ;; the found groups are NOT the full groups
+      (setq found (gnus-registry-post-process-groups 
+		   "sender" sender found found-full)))
       
      ;; else: there were no matches, now try the extra tracking by subject
      ((and (gnus-registry-track-subject-p)
@@ -546,6 +562,7 @@
 		      (equal subject this-subject))
 	     (let ((groups (gnus-registry-fetch-groups key)))
 	       (dolist (group groups)
+		 (push group found-full)
 		 (setq found (append (list group) (delete group found)))))
 	     (push key matches)
 	     (gnus-message
@@ -555,10 +572,13 @@
 	      log-agent subject found matches))))
        gnus-registry-hashtb)
       ;; filter the found groups and return them
+      ;; the found groups are NOT the full groups
       (setq found (gnus-registry-post-process-groups 
-		   "subject" subject found))))))
+		   "subject" subject found found-full))))
+    ;; after the (cond) we extract the actual value safely
+    (car-safe found)))
 
-(defun gnus-registry-post-process-groups (mode key groups)
+(defun gnus-registry-post-process-groups (mode key groups groups-full)
   "Modifies GROUPS found by MODE for KEY to determine which ones to follow.
 
 MODE can be 'subject' or 'sender' for example.  The KEY is the
@@ -572,9 +592,28 @@
 false.  Foreign methods are not supported so they are rejected.
 
 Reduces the list to a single group, or complains if that's not
-possible."
+possible.  Uses `gnus-registry-split-strategy' and GROUPS-FULL if
+necessary."
   (let ((log-agent "gnus-registry-post-process-group")
 	out)
+
+    ;; the strategy can be 'first, 'majority, or nil
+    (when (eq gnus-registry-split-strategy 'first)
+      (when groups
+	(setq groups (list (car-safe groups)))))
+
+    (when (eq gnus-registry-split-strategy 'majority)
+      (let ((freq (make-hash-table
+		   :size 256
+		   :test 'equal)))
+	(mapc (lambda(x) (puthash x (1+ (gethash x freq 0)) freq)) groups-full)
+	(setq groups (list (car-safe
+			    (sort
+			     groups
+			     (lambda (a b)
+			       (> (gethash a freq 0)
+				  (gethash b freq 0)))))))))
+    
     (if gnus-registry-use-long-group-names
 	(dolist (group groups)
 	  (let ((m1 (gnus-find-method-for-group group))
@@ -1123,5 +1162,5 @@
 
 (provide 'gnus-registry)
 
-;;; arch-tag: 5cba0a32-718a-4a97-8c91-0a15af21da94
+;; arch-tag: 5cba0a32-718a-4a97-8c91-0a15af21da94
 ;;; gnus-registry.el ends here
Index: gnus/lisp/gnus-score.el
diff -u gnus/lisp/gnus-score.el:7.37 gnus/lisp/gnus-score.el:7.38
--- gnus/lisp/gnus-score.el:7.37	Sun Mar 16 16:49:30 2008
+++ gnus/lisp/gnus-score.el	Thu Apr 24 06:19:21 2008
@@ -3114,5 +3114,5 @@
 
 (provide 'gnus-score)
 
-;;; arch-tag: d3922589-764d-46ae-9954-9330fd192634
+;; arch-tag: d3922589-764d-46ae-9954-9330fd192634
 ;;; gnus-score.el ends here
Index: gnus/lisp/gnus-setup.el
diff -u gnus/lisp/gnus-setup.el:7.9 gnus/lisp/gnus-setup.el:7.10
--- gnus/lisp/gnus-setup.el:7.9	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/gnus-setup.el	Thu Apr 24 06:19:20 2008
@@ -191,5 +191,5 @@
 
 (run-hooks 'gnus-setup-load-hook)
 
-;;; arch-tag: 08e4af93-8565-46bf-905c-36229400609d
+;; arch-tag: 08e4af93-8565-46bf-905c-36229400609d
 ;;; gnus-setup.el ends here
Index: gnus/lisp/gnus-sieve.el
diff -u gnus/lisp/gnus-sieve.el:7.10 gnus/lisp/gnus-sieve.el:7.11
--- gnus/lisp/gnus-sieve.el:7.10	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/gnus-sieve.el	Thu Apr 24 06:19:20 2008
@@ -237,5 +237,5 @@
 
 (provide 'gnus-sieve)
 
-;;; arch-tag: 3b906527-c7f3-4c86-9e82-62e2697998a3
+;; arch-tag: 3b906527-c7f3-4c86-9e82-62e2697998a3
 ;;; gnus-sieve.el ends here
Index: gnus/lisp/gnus-soup.el
diff -u gnus/lisp/gnus-soup.el:7.12 gnus/lisp/gnus-soup.el:7.13
--- gnus/lisp/gnus-soup.el:7.12	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/gnus-soup.el	Thu Apr 24 06:19:21 2008
@@ -594,9 +594,8 @@
 			      (mail-fetch-field "to"))
 		(sit-for 1)
 		(let ((mail-header-separator ""))
-		  (mm-with-unibyte-current-buffer
-		    (funcall (or message-send-mail-real-function
-				 message-send-mail-function)))))
+                  (funcall (or message-send-mail-real-function
+                               message-send-mail-function))))
 	       (t
 		(error "Unknown reply kind")))
 	      (set-buffer msg-buf)
@@ -610,5 +609,5 @@
 
 (provide 'gnus-soup)
 
-;;; arch-tag: eddfa69d-13e8-4aea-84ef-62a526ef185c
+;; arch-tag: eddfa69d-13e8-4aea-84ef-62a526ef185c
 ;;; gnus-soup.el ends here
Index: gnus/lisp/gnus-spec.el
diff -u gnus/lisp/gnus-spec.el:7.21 gnus/lisp/gnus-spec.el:7.22
--- gnus/lisp/gnus-spec.el:7.21	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/gnus-spec.el	Thu Apr 24 06:19:21 2008
@@ -769,5 +769,5 @@
 ;; coding: iso-8859-1
 ;; End:
 
-;;; arch-tag: a4328fa1-1f84-4b09-97ad-4b5767cfd50f
+;; arch-tag: a4328fa1-1f84-4b09-97ad-4b5767cfd50f
 ;;; gnus-spec.el ends here
Index: gnus/lisp/gnus-srvr.el
diff -u gnus/lisp/gnus-srvr.el:7.33 gnus/lisp/gnus-srvr.el:7.34
--- gnus/lisp/gnus-srvr.el:7.33	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/gnus-srvr.el	Thu Apr 24 06:19:20 2008
@@ -1029,5 +1029,5 @@
 
 (provide 'gnus-srvr)
 
-;;; arch-tag: c0117f64-27ca-475d-9406-8da6854c7a25
+;; arch-tag: c0117f64-27ca-475d-9406-8da6854c7a25
 ;;; gnus-srvr.el ends here
Index: gnus/lisp/gnus-sum.el
diff -u gnus/lisp/gnus-sum.el:7.219 gnus/lisp/gnus-sum.el:7.224
--- gnus/lisp/gnus-sum.el:7.219	Sat Mar 29 13:02:00 2008
+++ gnus/lisp/gnus-sum.el	Thu May  1 16:26:34 2008
@@ -1208,6 +1208,12 @@
   :type 'boolean
   :group 'gnus-summary-marks)
 
+(defcustom gnus-propagate-marks t
+  "If non-nil, do not propagate marks to the backends."
+  :version "21.1"
+  :type 'boolean
+  :group 'gnus-summary-marks)
+
 (defcustom gnus-alter-articles-to-read-function nil
   "Function to be called to alter the list of articles to be selected."
   :type '(choice (const nil) function)
@@ -1372,6 +1378,12 @@
     (?E gnus-newsgroup-expunged-tally ?d)
     (?s (gnus-current-score-file-nondirectory) ?s)))
 
+;; This is here rather than in gnus-art for compilation reasons.
+(defvar gnus-article-mode-line-format-alist
+  (nconc '((?w (gnus-article-wash-status) ?s)
+	   (?m (gnus-article-mime-part-status) ?s))
+	 gnus-summary-mode-line-format-alist))
+
 (defvar gnus-last-search-regexp nil
   "Default regexp for article search command.")
 
@@ -1563,22 +1575,10 @@
 	 \"^From:\\\\|^Newsgroups:\\\\|^Subject:\\\\|^Date:\\\\|^To:\")))
 ")
 
-;; Byte-compiler warning.  Specifically, this is responsible for:
-;; "Warning: the following functions might not be defined at runtime:
-;; gnus-build-sparse-threads, gnus-dead-summary-mode, gnus-summary-mark-below".
 (eval-when-compile
   ;; Bind features so that require will believe that gnus-sum has
   ;; already been loaded (avoids infinite recursion)
   (let ((features (cons 'gnus-sum features)))
-    ;; Several of the declarations in gnus-sum are needed to load the
-    ;; following files. Right now, these definitions have been
-    ;; compiled but not defined (evaluated).  We could either do a
-    ;; eval-and-compile about all of the declarations or evaluate the
-    ;; source file.
-    (if (boundp 'gnus-newsgroup-variables)
-        nil
-      (load "gnus-sum.el" t t t))
-    (require 'gnus)
     (require 'gnus-art)))
 
 ;; MIME stuff.
@@ -3393,7 +3393,7 @@
 (defun gnus-restore-hidden-threads-configuration (config)
   "Restore hidden threads configuration from CONFIG."
   (save-excursion
-    (let (point buffer-read-only)
+    (let (point (inhibit-read-only t))
       (while (setq point (pop config))
 	(when (and (< point (point-max))
 		   (goto-char point)
@@ -3716,7 +3716,7 @@
 	 (gnus-tmp-subject (mail-header-subject gnus-tmp-header))
 	 (gnus-tmp-opening-bracket (if gnus-tmp-dummy ?\< ?\[))
 	 (gnus-tmp-closing-bracket (if gnus-tmp-dummy ?\> ?\]))
-	 (buffer-read-only nil))
+	 (inhibit-read-only t))
     (when (string= gnus-tmp-name "")
       (setq gnus-tmp-name gnus-tmp-from))
     (unless (numberp gnus-tmp-lines)
@@ -4022,7 +4022,7 @@
 (defun gnus-summary-prepare ()
   "Generate the summary buffer."
   (interactive)
-  (let ((buffer-read-only nil))
+  (let ((inhibit-read-only t))
     (erase-buffer)
     (setq gnus-newsgroup-data nil
 	  gnus-newsgroup-data-reverse nil)
@@ -4430,8 +4430,7 @@
   (let ((deps gnus-newsgroup-dependencies)
 	found header)
     (prog1
-	(save-excursion
-	  (set-buffer nntp-server-buffer)
+	(with-current-buffer nntp-server-buffer
 	  (let ((case-fold-search nil))
 	    (goto-char (point-min))
 	    (while (and (not found)
@@ -4466,8 +4465,7 @@
 	(mail-parse-charset gnus-newsgroup-charset)
 	(dependencies gnus-newsgroup-dependencies)
 	header article)
-    (save-excursion
-      (set-buffer nntp-server-buffer)
+    (with-current-buffer nntp-server-buffer
       (let ((case-fold-search nil))
 	(goto-char (point-min))
 	(while (not (eobp))
@@ -4499,7 +4497,7 @@
     (gnus-summary-goto-subject article)
     (let* ((datal (gnus-data-find-list article))
 	   (data (car datal))
-	   (buffer-read-only nil)
+	   (inhibit-read-only t)
 	   (level (gnus-summary-thread-level)))
       (gnus-delete-line)
       (let ((inserted (- (point)
@@ -4550,7 +4548,7 @@
 			   (not (equal "" references)))
 		  references))
 	       "none")))
-	 (buffer-read-only nil)
+	 (inhibit-read-only t)
 	 (old (car thread)))
     (when thread
       (unless iheader
@@ -4566,7 +4564,7 @@
 (defun gnus-rebuild-thread (id &optional line)
   "Rebuild the thread containing ID.
 If LINE, insert the rebuilt thread starting on line LINE."
-  (let ((buffer-read-only nil)
+  (let ((inhibit-read-only t)
 	old-pos current thread data)
     (if (not gnus-show-threads)
 	(setq thread (list (car (gnus-id-to-thread id))))
@@ -5051,6 +5049,16 @@
   :type 'string
   :group 'gnus-thread)
 
+(defcustom gnus-summary-display-while-building nil
+  "If non-nil, show and update the summary buffer as it's being built.
+If the value is t, update the buffer after every line is inserted.  If
+the value is an integer (N), update the display every N lines."
+  :version "22.1"
+  :group 'gnus-thread
+  :type '(choice (const :tag "off" nil)
+		 number
+		 (const :tag "frequently" t)))
+
 (defun gnus-summary-prepare-threads (threads)
   "Prepare summary buffer from THREADS and indentation LEVEL.
 THREADS is either a list of `(PARENT [(CHILD1 [(GRANDCHILD ...]...) ...])'
@@ -5970,11 +5978,10 @@
 	     (symbol-value
 	      (intern (format "gnus-%s-mode-line-format-spec" where))))
     (let (mode-string)
-      (save-excursion
-	;; We evaluate this in the summary buffer since these
-	;; variables are buffer-local to that buffer.
-	(set-buffer gnus-summary-buffer)
-       ;; We bind all these variables that are used in the `eval' form
+      ;; We evaluate this in the summary buffer since these
+      ;; variables are buffer-local to that buffer.
+      (with-current-buffer gnus-summary-buffer
+        ;; We bind all these variables that are used in the `eval' form
 	;; below.
 	(let* ((mformat (symbol-value
 			 (intern
@@ -6179,12 +6186,11 @@
 	headers id end ref number
 	(mail-parse-charset gnus-newsgroup-charset)
 	(mail-parse-ignored-charsets
-	 (save-excursion (condition-case nil
-			     (set-buffer gnus-summary-buffer)
-			   (error))
-			 gnus-newsgroup-ignored-charsets)))
-    (save-excursion
-      (set-buffer nntp-server-buffer)
+	 (save-current-buffer (condition-case nil
+                                  (set-buffer gnus-summary-buffer)
+                                (error))
+                              gnus-newsgroup-ignored-charsets)))
+    (with-current-buffer nntp-server-buffer
       ;; Translate all TAB characters into SPACE characters.
       (subst-char-in-region (point-min) (point-max) ?\t ?  t)
       (subst-char-in-region (point-min) (point-max) ?\r ?  t)
@@ -6350,8 +6356,7 @@
 	       (t
 		nil)))
 	number headers header)
-    (save-excursion
-      (set-buffer nntp-server-buffer)
+    (with-current-buffer nntp-server-buffer
       (subst-char-in-region (point-min) (point-max) ?\r ?  t)
       ;; Allow the user to mangle the headers before parsing them.
       (gnus-run-hooks 'gnus-parse-headers-hook)
@@ -6475,8 +6480,7 @@
   "Return a list of articles to be worked upon.
 The prefix argument, the list of process marked articles, and the
 current article will be taken into consideration."
-  (save-excursion
-    (set-buffer gnus-summary-buffer)
+  (with-current-buffer gnus-summary-buffer
     (cond
      (n
       ;; A numerical prefix has been given.
@@ -6560,8 +6564,7 @@
 (defun gnus-summary-search-group (&optional backward use-level)
   "Search for next unread newsgroup.
 If optional argument BACKWARD is non-nil, search backward instead."
-  (save-excursion
-    (set-buffer gnus-group-buffer)
+  (with-current-buffer gnus-group-buffer
     (when (gnus-group-search-forward
 	   backward nil (if use-level (gnus-group-group-level) nil))
       (gnus-group-group-name))))
@@ -6747,7 +6750,7 @@
 	(gnus-group-jump-to-group newsgroup))
     (save-excursion
       ;; Take care of tree window mode.
-      (if (get-buffer-window gnus-group-buffer)
+      (if (get-buffer-window gnus-group-buffer 0)
 	  (pop-to-buffer gnus-group-buffer)
 	(set-buffer gnus-group-buffer))
       (gnus-group-jump-to-group newsgroup))))
@@ -6998,8 +7001,7 @@
   (interactive)
   (gnus-set-global-variables)
   (when (gnus-buffer-live-p gnus-article-buffer)
-    (save-excursion
-      (set-buffer gnus-article-buffer)
+    (with-current-buffer gnus-article-buffer
       (mm-destroy-parts gnus-article-mime-handles)
       ;; Set it to nil for safety reason.
       (setq gnus-article-mime-handle-alist nil)
@@ -7105,8 +7107,7 @@
       (gnus-async-halt-prefetch)
       (run-hooks 'gnus-summary-prepare-exit-hook)
       (when (gnus-buffer-live-p gnus-article-buffer)
-	(save-excursion
-	  (set-buffer gnus-article-buffer)
+	(with-current-buffer gnus-article-buffer
 	  (mm-destroy-parts gnus-article-mime-handles)
 	  ;; Set it to nil for safety reason.
 	  (setq gnus-article-mime-handle-alist nil)
@@ -7150,7 +7151,7 @@
     (cond ((eq major-mode 'gnus-summary-mode)
 	   (gnus-set-global-variables))
 	  ((eq major-mode 'gnus-article-mode)
-	   (save-excursion
+	   (save-current-buffer
 	     ;; The `gnus-summary-buffer' variable may point
 	     ;; to the old summary buffer when using a single
 	     ;; article buffer.
@@ -7245,14 +7246,12 @@
      (gnus-kill-summary-on-exit
       (when (and gnus-use-trees
 		 (gnus-buffer-exists-p buffer))
-	(save-excursion
-	  (set-buffer buffer)
+	(with-current-buffer buffer
 	  (gnus-tree-close gnus-newsgroup-name)))
       (gnus-kill-buffer buffer))
      ;; Deaden the buffer.
      ((gnus-buffer-exists-p buffer)
-      (save-excursion
-	(set-buffer buffer)
+      (with-current-buffer buffer
 	(gnus-deaden-summary))))))
 
 (defun gnus-summary-wake-up-the-dead (&rest args)
@@ -7452,7 +7451,7 @@
   (gnus-summary-position-point))
 
 (defun gnus-summary-goto-subject (article &optional force silent)
-  "Go the subject line of ARTICLE.
+  "Go to the subject line of ARTICLE.
 If FORCE, also allow jumping to articles not currently shown."
   (interactive "nArticle number: ")
   (unless (numberp article)
@@ -7533,8 +7532,7 @@
     (and (not pseudo)
 	 (gnus-summary-article-pseudo-p article)
 	 (error "This is a pseudo-article"))
-    (save-excursion
-      (set-buffer gnus-summary-buffer)
+    (with-current-buffer gnus-summary-buffer
       (if (or (and gnus-single-article-buffer
 		   (or (null gnus-current-article)
 		       (null gnus-article-current)
@@ -7643,8 +7641,7 @@
 		      (?\C-p (gnus-group-prev-unread-group 1))))
 	(cursor-in-echo-area t)
 	keve key group ended prompt)
-    (save-excursion
-      (set-buffer gnus-group-buffer)
+    (with-current-buffer gnus-group-buffer
       (goto-char start)
       (setq group
 	    (if (eq gnus-keep-same-level 'best)
@@ -8748,8 +8745,7 @@
 	  ;; References header, since this is slightly more
 	  ;; reliable than the References field we got from the
 	  ;; server.
-	  (save-excursion
-	    (set-buffer gnus-original-article-buffer)
+	  (with-current-buffer gnus-original-article-buffer
 	    (nnheader-narrow-to-headers)
 	    (unless (setq ref (message-fetch-field "references"))
 	      (when (setq ref (message-fetch-field "in-reply-to"))
@@ -8924,8 +8920,7 @@
 	   (case-fold-search t)
 	   (buf (current-buffer))
 	   dig to-address)
-      (save-excursion
-	(set-buffer gnus-original-article-buffer)
+      (with-current-buffer gnus-original-article-buffer
 	;; Have the digest group inherit the main mail address of
 	;; the parent article.
 	(when (setq to-address (or (gnus-fetch-field "reply-to")
@@ -8995,7 +8990,7 @@
 				     (nndoc-article-type guess))
 		       t nil t))
 		(progn
-	    ;; Make all postings to this group go to the parent group.
+                  ;; Make all postings to this group go to the parent group.
 		  (nconc (gnus-info-params (gnus-get-info egroup))
 			 params)
 		  (push egroup groups))
@@ -9150,6 +9145,7 @@
 This search includes all articles in the current group that Gnus has
 fetched headers for, whether they are displayed or not."
   (let ((articles nil)
+	;; Can't eta-reduce because it's a macro.
 	(func `(lambda (h) (,(intern (concat "mail-header-" header)) h)))
 	(case-fold-search t))
     (dolist (header gnus-newsgroup-headers)
@@ -9346,8 +9342,7 @@
       (gnus-summary-select-article nil 'force)
       (let ((deps gnus-newsgroup-dependencies)
 	    head header lines)
-	(save-excursion
-	  (set-buffer gnus-original-article-buffer)
+	(with-current-buffer gnus-original-article-buffer
 	  (save-restriction
 	    (message-narrow-to-head)
 	    (setq head (buffer-string))
@@ -9387,8 +9382,7 @@
 	  gnus-break-pages)
       ;; Destroy any MIME parts.
       (when (gnus-buffer-live-p gnus-article-buffer)
-	(save-excursion
-	  (set-buffer gnus-article-buffer)
+	(with-current-buffer gnus-article-buffer
 	  (mm-destroy-parts gnus-article-mime-handles)
 	  ;; Set it to nil for safety reason.
 	  (setq gnus-article-mime-handle-alist nil)
@@ -9425,7 +9419,7 @@
     (with-current-buffer gnus-article-buffer
       (widen)
       (article-narrow-to-head)
-      (let* ((buffer-read-only nil)
+      (let* ((inhibit-read-only t)
 	     (inhibit-point-motion-hooks t)
 	     (hidden (if (numberp arg)
 			 (>= arg 0)
@@ -9452,7 +9446,7 @@
 	(if gnus-break-pages
 	    (gnus-narrow-to-page)
 	  (when (gnus-visual-p 'page-marker)
-	    (let ((buffer-read-only nil))
+	    (let ((inhibit-read-only t))
 	      (gnus-remove-text-with-property 'gnus-prev)
 	      (gnus-remove-text-with-property 'gnus-next))))
 	(gnus-set-mode-line 'article)))))
@@ -9473,7 +9467,7 @@
       (save-restriction
 	(widen)
 	(let ((start (window-start))
-	      buffer-read-only)
+	      (inhibit-read-only t))
 	  (if (equal arg '(4))
 	      (message-caesar-buffer-body nil t)
 	    (message-caesar-buffer-body arg))
@@ -9519,7 +9513,7 @@
 	(save-restriction
 	  (widen)
 	  (let ((pos (window-start))
-		buffer-read-only)
+		(inhibit-read-only t))
 	    (goto-char (point-min))
 	    (when (message-goto-body)
 	      (gnus-narrow-to-body))
@@ -9537,7 +9531,7 @@
   (gnus-eval-in-buffer-window gnus-article-buffer
     (widen)
     (when (gnus-visual-p 'page-marker)
-      (let ((buffer-read-only nil))
+      (let ((inhibit-read-only t))
 	(gnus-remove-text-with-property 'gnus-prev)
 	(gnus-remove-text-with-property 'gnus-next))
       (setq gnus-page-broken nil))))
@@ -9662,8 +9656,7 @@
 	    move-is-internal)))		; is this move internal?
 	;; Copy the article.
 	((eq action 'copy)
-	 (save-excursion
-	   (set-buffer copy-buf)
+	 (with-current-buffer copy-buf
 	   (when (gnus-request-article-this-buffer article gnus-newsgroup-name)
 	     (save-restriction
 	       (nnheader-narrow-to-headers)
@@ -9686,8 +9679,7 @@
 			     (delete "Xref:" (delete new-xref xref))
 			     " ")
 		  " " new-xref))
-	   (save-excursion
-	     (set-buffer copy-buf)
+	   (with-current-buffer copy-buf
 	     ;; First put the article in the destination group.
 	     (gnus-request-article-this-buffer article gnus-newsgroup-name)
 	     (when (consp (setq art-group
@@ -9791,8 +9783,7 @@
 	  ;; Update the Xref header in this article to point to
 	  ;; the new crossposted article we have just created.
 	  (when (eq action 'crosspost)
-	    (save-excursion
-	      (set-buffer copy-buf)
+	    (with-current-buffer copy-buf
 	      (gnus-request-article-this-buffer article gnus-newsgroup-name)
 	      (nnheader-replace-header "Xref" new-xref)
 	      (gnus-request-replace-article
@@ -9817,8 +9808,7 @@
 
     (apply 'gnus-summary-remove-process-mark articles-to-update-marks)
     ;; Re-activate all groups that have been moved to.
-    (save-excursion
-      (set-buffer gnus-group-buffer)
+    (with-current-buffer gnus-group-buffer
       (let ((gnus-group-marked to-groups))
 	(gnus-group-get-new-news-this-group nil t)))
 
@@ -9848,16 +9838,6 @@
   :type 'symbol
   :group 'gnus-summary-mail)
 
-(defcustom gnus-summary-display-while-building nil
-  "If non-nil, show and update the summary buffer as it's being built.
-If the value is t, update the buffer after every line is inserted.  If
-the value is an integer (N), update the display every N lines."
-  :version "22.1"
-  :group 'gnus-thread
-  :type '(choice (const :tag "off" nil)
-		 number
-		 (const :tag "frequently" t)))
-
 (defun gnus-summary-respool-article (&optional n method)
   "Respool the current article.
 The article will be squeezed through the mail spooling process again,
@@ -9913,8 +9893,7 @@
     (or (file-readable-p file)
 	(not (file-regular-p file))
 	(error "Can't read %s" file))
-    (save-excursion
-      (set-buffer (gnus-get-buffer-create " *import file*"))
+    (with-current-buffer (gnus-get-buffer-create " *import file*")
       (erase-buffer)
       (nnheader-insert-file-contents file)
       (goto-char (point-min))
@@ -9952,8 +9931,7 @@
 	group-art)
     (unless (gnus-check-backend-function 'request-accept-article group)
       (error "%s does not support article importing" group))
-    (save-excursion
-      (set-buffer (gnus-get-buffer-create " *import file*"))
+    (with-current-buffer (gnus-get-buffer-create " *import file*")
       (erase-buffer)
       (goto-char (point-min))
       ;; This doesn't look like an article, so we fudge some headers.
@@ -10136,8 +10114,7 @@
 					     "nndraft:queue")))
       (error "Can't edit the raw article in group %s"
 	     gnus-newsgroup-name))
-    (save-excursion
-      (set-buffer gnus-summary-buffer)
+    (with-current-buffer gnus-summary-buffer
       (let ((mail-parse-charset gnus-newsgroup-charset)
 	    (mail-parse-ignored-charsets gnus-newsgroup-ignored-charsets))
 	(gnus-set-global-variables)
@@ -10244,8 +10221,7 @@
 		    (let ((nntp-server-buffer (current-buffer)))
 		      (setq header (car (gnus-get-newsgroup-headers
 					 nil t))))
-		    (save-excursion
-		      (set-buffer gnus-summary-buffer)
+		    (with-current-buffer gnus-summary-buffer
 		      (gnus-data-set-header
 		       (gnus-data-find (cdr gnus-article-current))
 		       header)
@@ -10263,8 +10239,7 @@
 	       (cdr gnus-article-current))))
 	;; Prettify the article buffer again.
 	(unless no-highlight
-	  (save-excursion
-	    (set-buffer gnus-article-buffer)
+	  (with-current-buffer gnus-article-buffer
 	    ;;;!!! Fix this -- article should be rehighlighted.
 	    ;;;(gnus-run-hooks 'gnus-article-display-hook)
 	    (set-buffer gnus-original-article-buffer)
@@ -10294,8 +10269,7 @@
   (interactive)
   (let (gnus-mark-article-hook)
     (gnus-summary-select-article)
-    (save-excursion
-      (set-buffer gnus-original-article-buffer)
+    (with-current-buffer gnus-original-article-buffer
       (let ((groups (nnmail-article-group 'identity trace)))
 	(unless silent
 	  (if groups
@@ -10456,7 +10430,7 @@
       (unless (numberp article)
 	(error "%s is not a number" article))
       (push article gnus-newsgroup-replied)
-      (let ((buffer-read-only nil))
+      (let ((inhibit-read-only t))
 	(when (gnus-summary-goto-subject article nil t)
 	  (gnus-summary-update-secondary-mark article))))))
 
@@ -10466,7 +10440,7 @@
   (let ((articles (if (listp article) article (list article))))
     (dolist (article articles)
       (push article gnus-newsgroup-forwarded)
-      (let ((buffer-read-only nil))
+      (let ((inhibit-read-only t))
 	(when (gnus-summary-goto-subject article nil t)
 	  (gnus-summary-update-secondary-mark article))))))
 
@@ -10685,7 +10659,7 @@
 		(= mark gnus-dormant-mark) (= mark gnus-unread-mark))))
 
 	(when (gnus-summary-goto-subject article nil t)
-	  (let ((buffer-read-only nil))
+	  (let ((inhibit-read-only t))
 	    (gnus-summary-show-thread)
 	    ;; Fix the mark.
 	    (gnus-summary-update-mark mark 'unread)
@@ -10729,7 +10703,7 @@
 
 (defun gnus-summary-update-mark (mark type)
   (let ((forward (cdr (assq type gnus-summary-mark-positions)))
-	(buffer-read-only nil))
+	(inhibit-read-only t))
     (re-search-backward "[\n\r]" (point-at-bol) 'move-to-limit)
     (when forward
       (when (looking-at "\r")
@@ -10914,8 +10888,7 @@
   (setq score (if score
 		  (prefix-numeric-value score)
 		(or gnus-summary-default-score 0)))
-  (save-excursion
-    (set-buffer gnus-summary-buffer)
+  (with-current-buffer gnus-summary-buffer
     (goto-char (point-min))
     (while
 	(progn
@@ -10944,8 +10917,7 @@
   (setq score (if score
 		  (prefix-numeric-value score)
 		(or gnus-summary-default-score 0)))
-  (save-excursion
-    (set-buffer gnus-summary-buffer)
+  (with-current-buffer gnus-summary-buffer
     (goto-char (point-min))
     (while (and (progn
 		  (when (> (gnus-summary-article-score) score)
@@ -10958,7 +10930,7 @@
 (defun gnus-summary-limit-include-expunged (&optional no-error)
   "Display all the hidden articles that were expunged for low scores."
   (interactive)
-  (let ((buffer-read-only nil))
+  (let ((inhibit-read-only t))
     (let ((scored gnus-newsgroup-scored)
 	  headers h)
       (while scored
@@ -11334,8 +11306,7 @@
 	(start (point))
 	(article (gnus-summary-article-number)))
     (goto-char start)
-    ;; Go forward until either the buffer ends or the subthread
-    ;; ends.
+    ;; Go forward until either the buffer ends or the subthread ends.
     (when (and (not (eobp))
 	       (or (zerop (gnus-summary-next-thread 1 t))
 		   (goto-char (point-max))))
@@ -11540,7 +11511,7 @@
   "Sort the summary buffer using the default sorting method.
 Argument REVERSE means reverse order."
   (interactive "P")
-  (let* ((buffer-read-only)
+  (let* ((inhibit-read-only t)
 	 (gnus-summary-prepare-hook nil))
     ;; We do the sorting by regenerating the threads.
     (gnus-summary-prepare)
@@ -11563,7 +11534,7 @@
 	      article
 	    `(lambda (t1 t2)
 	       (,article t2 t1))))
-	 (buffer-read-only)
+	 (inhibit-read-only t)
 	 (gnus-summary-prepare-hook nil))
     ;; We do the sorting by regenerating the threads.
     (gnus-summary-prepare)
@@ -11614,8 +11585,7 @@
 					     gnus-article-prepare-hook)))
 	    (gnus-summary-select-article t nil nil article)
 	    (gnus-summary-goto-subject article)))
-	(save-excursion
-	  (set-buffer save-buffer)
+	(with-current-buffer save-buffer
 	  (erase-buffer)
 	  (insert-buffer-substring (if decode
 				       gnus-article-buffer
@@ -11735,7 +11705,7 @@
       (save-restriction
 	(widen)
 	(let ((start (window-start))
-	      buffer-read-only)
+	      (inhibit-read-only t))
 	  (message-pipe-buffer-body program)
 	  (set-window-start (get-buffer-window (current-buffer)) start))))))
 
@@ -11743,8 +11713,7 @@
   "Return a value based on the split METHODS."
   (let (split-name method result match)
     (when methods
-      (save-excursion
-	(set-buffer gnus-original-article-buffer)
+      (with-current-buffer gnus-original-article-buffer
 	(save-restriction
 	  (nnheader-narrow-to-headers)
 	  (while (and methods (not split-name))
@@ -11855,10 +11824,13 @@
 	 current-prefix-arg))
   (gnus-summary-iterate n
     (let ((gnus-display-mime-function nil)
+	  gnus-article-prepare-hook
+	  gnus-article-decode-hook
+	  gnus-display-mime-function
+	  gnus-break-pages
 	  (gnus-inhibit-treatment t))
       (gnus-summary-select-article))
-    (save-excursion
-      (set-buffer gnus-article-buffer)
+    (with-current-buffer gnus-article-buffer
       (let ((handles (or gnus-article-mime-handles
 			 (mm-dissect-buffer nil gnus-article-loose-mime)
 			 (and gnus-article-emulate-mime
@@ -11896,7 +11868,7 @@
 ;; Summary extract commands
 
 (defun gnus-summary-insert-pseudos (pslist &optional not-view)
-  (let ((buffer-read-only nil)
+  (let ((inhibit-read-only t)
 	(article (gnus-summary-article-number))
 	after-article b e)
     (unless (gnus-summary-goto-subject article)
@@ -12024,8 +11996,7 @@
 	;; We have found the header.
 	header
       ;; We have to really fetch the header to this article.
-      (save-excursion
-	(set-buffer nntp-server-buffer)
+      (with-current-buffer nntp-server-buffer
 	(when (setq where (gnus-request-head id group))
 	  (nnheader-fold-continuation-lines)
 	  (goto-char (point-max))
@@ -12053,8 +12024,7 @@
 	      ;; 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)
+	    (with-current-buffer gnus-summary-buffer
 	      (decf gnus-reffed-article-number)
 	      (gnus-remove-header (mail-header-number header))
 	      (push header gnus-newsgroup-headers)
@@ -12191,7 +12161,8 @@
 	(save-excursion
 	  (let (setmarkundo)
 	    ;; Propagate the read marks to the backend.
-	    (when (gnus-check-backend-function 'request-set-mark group)
+	    (when (and gnus-propagate-marks
+		       (gnus-check-backend-function 'request-set-mark group))
 	      (let ((del (gnus-remove-from-range (gnus-info-read info) read))
 		    (add (gnus-remove-from-range read (gnus-info-read info))))
 		(when (or add del)
Index: gnus/lisp/gnus-topic.el
diff -u gnus/lisp/gnus-topic.el:7.23 gnus/lisp/gnus-topic.el:7.24
--- gnus/lisp/gnus-topic.el:7.23	Sun Feb 24 11:29:15 2008
+++ gnus/lisp/gnus-topic.el	Thu Apr 24 06:19:20 2008
@@ -1780,5 +1780,5 @@
 
 (provide 'gnus-topic)
 
-;;; arch-tag: bf176856-f30c-40f0-ae77-e41529a1134c
+;; arch-tag: bf176856-f30c-40f0-ae77-e41529a1134c
 ;;; gnus-topic.el ends here
Index: gnus/lisp/gnus-undo.el
diff -u gnus/lisp/gnus-undo.el:7.12 gnus/lisp/gnus-undo.el:7.13
--- gnus/lisp/gnus-undo.el:7.12	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/gnus-undo.el	Thu Apr 24 06:19:20 2008
@@ -190,5 +190,5 @@
 
 (provide 'gnus-undo)
 
-;;; arch-tag: 0d787bc7-787d-499a-837f-211d2cb07f2e
+;; arch-tag: 0d787bc7-787d-499a-837f-211d2cb07f2e
 ;;; gnus-undo.el ends here
Index: gnus/lisp/gnus-util.el
diff -u gnus/lisp/gnus-util.el:7.77 gnus/lisp/gnus-util.el:7.78
--- gnus/lisp/gnus-util.el:7.77	Sat Mar  1 02:48:13 2008
+++ gnus/lisp/gnus-util.el	Thu Apr 24 06:19:20 2008
@@ -1793,5 +1793,5 @@
 
 (provide 'gnus-util)
 
-;;; arch-tag: f94991af-d32b-4c97-8c26-ca12a934de49
+;; arch-tag: f94991af-d32b-4c97-8c26-ca12a934de49
 ;;; gnus-util.el ends here
Index: gnus/lisp/gnus-uu.el
diff -u gnus/lisp/gnus-uu.el:7.34 gnus/lisp/gnus-uu.el:7.35
--- gnus/lisp/gnus-uu.el:7.34	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/gnus-uu.el	Thu Apr 24 06:19:21 2008
@@ -2172,5 +2172,5 @@
 
 (provide 'gnus-uu)
 
-;;; arch-tag: 05312384-0a83-4720-9a58-b3160b888853
+;; arch-tag: 05312384-0a83-4720-9a58-b3160b888853
 ;;; gnus-uu.el ends here
Index: gnus/lisp/gnus-vm.el
diff -u gnus/lisp/gnus-vm.el:7.8 gnus/lisp/gnus-vm.el:7.9
--- gnus/lisp/gnus-vm.el:7.8	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/gnus-vm.el	Thu Apr 24 06:19:20 2008
@@ -105,5 +105,5 @@
 
 (provide 'gnus-vm)
 
-;;; arch-tag: 42ca7f88-a12f-461d-be3e-cac7efb44866
+;; arch-tag: 42ca7f88-a12f-461d-be3e-cac7efb44866
 ;;; gnus-vm.el ends here
Index: gnus/lisp/gnus-win.el
diff -u gnus/lisp/gnus-win.el:7.14 gnus/lisp/gnus-win.el:7.15
--- gnus/lisp/gnus-win.el:7.14	Thu Apr 10 13:56:15 2008
+++ gnus/lisp/gnus-win.el	Thu Apr 24 06:19:21 2008
@@ -592,5 +592,5 @@
 
 (provide 'gnus-win)
 
-;;; arch-tag: ccd5a394-2ddf-4397-b8f8-6d80d3e46e2b
+;; arch-tag: ccd5a394-2ddf-4397-b8f8-6d80d3e46e2b
 ;;; gnus-win.el ends here
Index: gnus/lisp/gnus.el
diff -u gnus/lisp/gnus.el:7.80 gnus/lisp/gnus.el:7.82
--- gnus/lisp/gnus.el:7.80	Thu Apr 10 20:55:44 2008
+++ gnus/lisp/gnus.el	Thu Apr 24 06:19:20 2008
@@ -295,7 +295,7 @@
   :link '(custom-manual "(gnus)Exiting Gnus")
   :group 'gnus)
 
-(defconst gnus-version-number "0.8"
+(defconst gnus-version-number "0.9"
   "Version number for this version of Gnus.")
 
 (defconst gnus-version (format "No Gnus v%s" gnus-version-number)
@@ -4375,5 +4375,5 @@
 
 (provide 'gnus)
 
-;;; arch-tag: acebeeab-f331-4f8f-a7ea-89c58c84f636
+;; arch-tag: acebeeab-f331-4f8f-a7ea-89c58c84f636
 ;;; gnus.el ends here
Index: gnus/lisp/hashcash.el
diff -u gnus/lisp/hashcash.el:7.25 gnus/lisp/hashcash.el:7.26
--- gnus/lisp/hashcash.el:7.25	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/hashcash.el	Thu Apr 24 06:19:21 2008
@@ -377,4 +377,4 @@
 
 (provide 'hashcash)
 
-;;; arch-tag: 0e7fe983-a124-4392-9788-0dbcbd2c4d62
+;; arch-tag: 0e7fe983-a124-4392-9788-0dbcbd2c4d62
Index: gnus/lisp/hmac-def.el
diff -u gnus/lisp/hmac-def.el:7.7 gnus/lisp/hmac-def.el:7.8
--- gnus/lisp/hmac-def.el:7.7	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/hmac-def.el	Thu Apr 24 06:19:21 2008
@@ -82,5 +82,5 @@
 
 (provide 'hmac-def)
 
-;;; arch-tag: 645adcef-b835-4900-a10a-11f636c982b9
+;; arch-tag: 645adcef-b835-4900-a10a-11f636c982b9
 ;;; hmac-def.el ends here
Index: gnus/lisp/hmac-md5.el
diff -u gnus/lisp/hmac-md5.el:7.7 gnus/lisp/hmac-md5.el:7.8
--- gnus/lisp/hmac-md5.el:7.7	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/hmac-md5.el	Thu Apr 24 06:19:21 2008
@@ -81,5 +81,5 @@
 
 (provide 'hmac-md5)
 
-;;; arch-tag: 0ab3f4f6-3d4b-4167-a9fa-635b7fed7f27
+;; arch-tag: 0ab3f4f6-3d4b-4167-a9fa-635b7fed7f27
 ;;; hmac-md5.el ends here
Index: gnus/lisp/html2text.el
diff -u gnus/lisp/html2text.el:7.21 gnus/lisp/html2text.el:7.22
--- gnus/lisp/html2text.el:7.21	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/html2text.el	Thu Apr 24 06:19:20 2008
@@ -510,5 +510,5 @@
 ;; </Interactive functions>
 ;;
 (provide 'html2text)
-;;; arch-tag: e9e57b79-35d4-4de1-a647-e7e01fe56d1e
+;; arch-tag: e9e57b79-35d4-4de1-a647-e7e01fe56d1e
 ;;; html2text.el ends here
Index: gnus/lisp/ietf-drums.el
diff -u gnus/lisp/ietf-drums.el:7.14 gnus/lisp/ietf-drums.el:7.15
--- gnus/lisp/ietf-drums.el:7.14	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/ietf-drums.el	Thu Apr 24 06:19:20 2008
@@ -289,5 +289,5 @@
 
 (provide 'ietf-drums)
 
-;;; arch-tag: 379a0191-dbae-4ca6-a0f5-d4202c209ef9
+;; arch-tag: 379a0191-dbae-4ca6-a0f5-d4202c209ef9
 ;;; ietf-drums.el ends here
Index: gnus/lisp/imap.el
diff -u gnus/lisp/imap.el:7.45 gnus/lisp/imap.el:7.46
--- gnus/lisp/imap.el:7.45	Wed Apr  2 16:46:57 2008
+++ gnus/lisp/imap.el	Thu Apr 24 06:19:20 2008
@@ -3005,5 +3005,5 @@
 
 (provide 'imap)
 
-;;; arch-tag: 27369ed6-33e4-482f-96f1-8bb906ba70f7
+;; arch-tag: 27369ed6-33e4-482f-96f1-8bb906ba70f7
 ;;; imap.el ends here
Index: gnus/lisp/mail-parse.el
diff -u gnus/lisp/mail-parse.el:7.11 gnus/lisp/mail-parse.el:7.12
--- gnus/lisp/mail-parse.el:7.11	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/mail-parse.el	Thu Apr 24 06:19:20 2008
@@ -76,5 +76,5 @@
 
 (provide 'mail-parse)
 
-;;; arch-tag: 3e63d75c-c962-4784-ab01-7ba07ca9d2d4
+;; arch-tag: 3e63d75c-c962-4784-ab01-7ba07ca9d2d4
 ;;; mail-parse.el ends here
Index: gnus/lisp/mail-prsvr.el
diff -u gnus/lisp/mail-prsvr.el:7.9 gnus/lisp/mail-prsvr.el:7.10
--- gnus/lisp/mail-prsvr.el:7.9	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/mail-prsvr.el	Thu Apr 24 06:19:21 2008
@@ -43,5 +43,5 @@
 
 (provide 'mail-prsvr)
 
-;;; arch-tag: 9ba878cc-8b43-4f7a-85b1-69b1a9a5d9f5
+;; arch-tag: 9ba878cc-8b43-4f7a-85b1-69b1a9a5d9f5
 ;;; mail-prsvr.el ends here
Index: gnus/lisp/mail-source.el
diff -u gnus/lisp/mail-source.el:7.31 gnus/lisp/mail-source.el:7.36
--- gnus/lisp/mail-source.el:7.31	Thu Apr 10 13:56:15 2008
+++ gnus/lisp/mail-source.el	Mon Apr 28 18:44:02 2008
@@ -36,6 +36,7 @@
   (require 'cl)
   (require 'imap))
 (eval-and-compile
+  (autoload 'auth-source-user-or-password "auth-source")
   (autoload 'pop3-movemail "pop3")
   (autoload 'pop3-get-message-count "pop3")
   (autoload 'nnheader-cancel-timer "nnheader"))
@@ -44,7 +45,6 @@
 
 (defvar display-time-mail-function)
 
-
 (defgroup mail-source nil
   "The mail-fetching library."
   :version "21.1"
@@ -420,6 +420,8 @@
     "Strip the leading colon off the KEYWORD."
     (intern (substring (symbol-name keyword) 1))))
 
+;; generate a list of variable names paired with nil values
+;; suitable for usage in a `let' form
 (eval-and-compile
   (defun mail-source-bind-1 (type)
     (let* ((defaults (cdr (assq type mail-source-keyword-map)))
@@ -438,12 +440,16 @@
 and the variables will be set according to it.  Variables not
 specified will be given default values.
 
+The user and password will be loaded from the auth-source values
+if those are available.  They override the original user and
+password in a second `let' form.
+
 After this is done, BODY will be executed in the scope
-of the `let' form.
+of the second `let' form.
 
 The variables bound and their default values are described by
 the `mail-source-keyword-map' variable."
-  `(let ,(mail-source-bind-1 (car type-source))
+  `(let* ,(mail-source-bind-1 (car type-source))
      (mail-source-set-1 ,(cadr type-source))
      ,@body))
 
@@ -453,12 +459,37 @@
 (defun mail-source-set-1 (source)
   (let* ((type (pop source))
 	 (defaults (cdr (assq type mail-source-keyword-map)))
-	 default value keyword)
+	 default value keyword user-auth pass-auth)
     (while (setq default (pop defaults))
+      ;; for each default :SYMBOL, set SYMBOL to the plist value for :SYMBOL
+      ;; using `mail-source-value' to evaluate the plist value
       (set (mail-source-strip-keyword (setq keyword (car default)))
-	   (if (setq value (plist-get source keyword))
-	       (mail-source-value value)
-	     (mail-source-value (cadr default)))))))
+	   ;; note the following reasons for this structure:
+	   ;; 1) the auth-sources user and password override everything
+	   ;; 2) it avoids macros, so it's cleaner
+	   ;; 3) it falls through to the mail-sources and then default values
+	   (cond 
+	    ((and
+	     (eq keyword :user)
+	     (setq user-auth 
+		   (auth-source-user-or-password
+		    "login"
+		    ;; this is "host" in auth-sources
+		    (if (boundp 'server) (symbol-value 'server) "")
+		    type)))
+	     user-auth)
+	    ((and
+	     (eq keyword :password)
+	     (setq pass-auth 
+		   (auth-source-user-or-password
+		    "password"
+		    ;; this is "host" in auth-sources
+		    (if (boundp 'server) (symbol-value 'server) "")
+		    type)))
+	     pass-auth)
+	    (t (if (setq value (plist-get source keyword))
+		 (mail-source-value value)
+	       (mail-source-value (cadr default)))))))))
 
 (eval-and-compile
   (defun mail-source-bind-common-1 ()
@@ -1114,5 +1145,5 @@
 
 (provide 'mail-source)
 
-;;; arch-tag: 72948025-1d17-4d6c-bb12-ef1aa2c490fd
+;; arch-tag: 72948025-1d17-4d6c-bb12-ef1aa2c490fd
 ;;; mail-source.el ends here
Index: gnus/lisp/mailcap.el
diff -u gnus/lisp/mailcap.el:7.14 gnus/lisp/mailcap.el:7.15
--- gnus/lisp/mailcap.el:7.14	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/mailcap.el	Thu Apr 24 06:19:20 2008
@@ -1007,7 +1007,55 @@
 	       (cdr l))))
       mailcap-mime-data)))))
 
+;;;
+;;; Useful supplementary functions
+;;;
+
+(defun mailcap-file-default-commands (files)
+  "Return a list of default commands for FILES."
+  (mailcap-parse-mailcaps)
+  (mailcap-parse-mimetypes)
+  (let* ((all-mime-type
+	  ;; All unique MIME types from file extensions
+	  (delete-dups (mapcar (lambda (file)
+				 (mailcap-extension-to-mime
+				  (file-name-extension file t)))
+			       files)))
+	 (all-mime-info
+	  ;; All MIME info lists
+	  (delete-dups (mapcar (lambda (mime-type)
+				 (mailcap-mime-info mime-type 'all))
+			       all-mime-type)))
+	 (common-mime-info
+	  ;; Intersection of mime-infos from different mime-types;
+	  ;; or just the first MIME info for a single MIME type
+	  (if (cdr all-mime-info)
+	      (delq nil (mapcar (lambda (mi1)
+				  (unless (memq nil (mapcar
+						     (lambda (mi2)
+						       (member mi1 mi2))
+						     (cdr all-mime-info)))
+				    mi1))
+				(car all-mime-info)))
+	    (car all-mime-info)))
+	 (commands
+	  ;; Command strings from `viewer' field of the MIME info
+	  (delete-dups
+	   (delq nil (mapcar (lambda (mime-info)
+			       (let ((command (cdr (assoc 'viewer mime-info))))
+				 (if (stringp command)
+				     (replace-regexp-in-string
+				      ;; Replace mailcap's `%s' placeholder
+				      ;; with dired's `?' placeholder
+				      "%s" "?"
+				      (replace-regexp-in-string
+				       ;; Remove the final filename placeholder
+				       "\s*\\('\\)?%s\\1?\s*\\'" "" command nil t)
+				      nil t))))
+			     common-mime-info)))))
+    commands))
+
 (provide 'mailcap)
 
-;;; arch-tag: 1fd4f9c9-c305-4d2e-9747-3a4d45baa0bd
+;; arch-tag: 1fd4f9c9-c305-4d2e-9747-3a4d45baa0bd
 ;;; mailcap.el ends here
Index: gnus/lisp/md4.el
diff -u gnus/lisp/md4.el:7.9 gnus/lisp/md4.el:7.10
--- gnus/lisp/md4.el:7.9	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/md4.el	Thu Apr 24 06:19:21 2008
@@ -224,5 +224,5 @@
 
 (provide 'md4)
 
-;;; arch-tag: 99d706fe-089b-42ea-9507-67ae41091e6e
+;; arch-tag: 99d706fe-089b-42ea-9507-67ae41091e6e
 ;;; md4.el ends here
Index: gnus/lisp/message.el
diff -u gnus/lisp/message.el:7.255 gnus/lisp/message.el:7.258
--- gnus/lisp/message.el:7.255	Mon Mar 24 20:38:12 2008
+++ gnus/lisp/message.el	Thu Apr 24 06:19:20 2008
@@ -425,7 +425,7 @@
   :type '(choice (const :tag "strict" "^-- $")
 		 (const :tag "loose" "^-- *$")
 		 regexp)
-  :version "23.1" ;; No Gnus (changed default)
+  :version "22.3" ;; Gnus 5.10.12 (changed default)
   :link '(custom-manual "(message)Various Message Variables")
   :group 'message-various)
 
@@ -569,7 +569,13 @@
   :link '(custom-manual "(message)Forwarding")
   :type 'boolean)
 
-(defcustom message-ignored-resent-headers "^Return-receipt\\|^X-Gnus\\|^Gnus-Warning:\\|^>?From "
+(defcustom message-ignored-resent-headers
+  ;; `Delivered-To' needs to be removed because some mailers use it to
+  ;; detect loops, so if you resend a message to an address that ultimately
+  ;; comes back to you (e.g. a mailing-list to which you subscribe, in which
+  ;; case you may be removed from the list on the grounds that mail to you
+  ;; bounced with a "mailing loop" error).
+  "^Return-receipt\\|^X-Gnus\\|^Gnus-Warning:\\|^>?From \\|^Delivered-To:"
   "*All headers that match this regexp will be deleted when resending a message."
   :group 'message-interface
   :link '(custom-manual "(message)Resending")
@@ -1012,6 +1018,7 @@
   :link '(custom-manual "(message)Insertion Variables")
   :type 'integer)
 
+;;;###autoload
 (defcustom message-cite-function 'message-cite-original-without-signature
   "*Function for citing an original message.
 Predefined functions include `message-cite-original' and
@@ -1022,7 +1029,7 @@
 		(function-item sc-cite-original)
 		(function :tag "Other"))
   :link '(custom-manual "(message)Insertion Variables")
-  :version "23.1" ;; No Gnus (changed default)
+  :version "22.3" ;; Gnus 5.10.12 (changed default)
   :group 'message-insertion)
 
 (defcustom message-indent-citation-function 'message-indent-citation
@@ -2483,6 +2490,7 @@
 
 
 (autoload 'Info-goto-node "info")
+(defvar mml2015-use)
 
 (defun message-info (&optional arg)
   "Display the Message manual.
@@ -2491,8 +2499,11 @@
 manual.  With two \\[universal-argument]'s, display the EasyPG or
 PGG manual, depending on the value of `mml2015-use'."
   (interactive "p")
+  ;; Why not `info', which is in loaddefs.el?
   (Info-goto-node (format "(%s)Top"
-			  (cond ((eq arg 16) mml2015-use)
+			  (cond ((eq arg 16)
+				 (require 'mml2015)
+				 mml2015-use)
 				((eq arg  4) 'emacs-mime)
 				;; `booleanp' only available in Emacs 22+
 				((and (not (memq arg '(nil t)))
@@ -5339,19 +5350,18 @@
 		   ;; Quote a string containing non-ASCII characters.
 		   ;; It will make the RFC2047 encoder cause an error
 		   ;; if there are special characters.
-		   (let ((default-enable-multibyte-characters t))
-		     (with-temp-buffer
-		       (insert (car name))
-		       (goto-char (point-min))
-		       (while (search-forward "\"" nil t)
-			 (when (prog2
-				   (backward-char)
-				   (zerop (% (skip-chars-backward "\\\\") 2))
-				 (goto-char (match-beginning 0)))
-			   (insert "\\"))
-			 (forward-char))
-		       ;; Those quotes will be removed by the RFC2047 encoder.
-		       (concat "\"" (buffer-string) "\"")))
+                   (mm-with-multibyte-buffer
+                     (insert (car name))
+                     (goto-char (point-min))
+                     (while (search-forward "\"" nil t)
+                       (when (prog2
+                                 (backward-char)
+                                 (zerop (% (skip-chars-backward "\\\\") 2))
+                               (goto-char (match-beginning 0)))
+                         (insert "\\"))
+                       (forward-char))
+                     ;; Those quotes will be removed by the RFC2047 encoder.
+                     (concat "\"" (buffer-string) "\""))
 		 (car name))
 	     (nth 1 name))
 	   "'s message of \""
Index: gnus/lisp/messcompat.el
diff -u gnus/lisp/messcompat.el:7.9 gnus/lisp/messcompat.el:7.10
--- gnus/lisp/messcompat.el:7.9	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/messcompat.el	Thu Apr 24 06:19:20 2008
@@ -91,5 +91,5 @@
 
 (provide 'messcompat)
 
-;;; arch-tag: a76673be-905e-4bbd-8966-615370494a7b
+;; arch-tag: a76673be-905e-4bbd-8966-615370494a7b
 ;;; messcompat.el ends here
Index: gnus/lisp/mm-bodies.el
diff -u gnus/lisp/mm-bodies.el:7.18 gnus/lisp/mm-bodies.el:7.19
--- gnus/lisp/mm-bodies.el:7.18	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/mm-bodies.el	Thu Apr 24 06:19:20 2008
@@ -203,10 +203,7 @@
 	       (when (re-search-backward "^[A-Za-z0-9+/]+=*[\t ]*$" nil t)
 		 (forward-line))
 	       (point))))
-	   ((memq encoding '(7bit 8bit binary))
-	    ;; Do nothing.
-	    t)
-	   ((null encoding)
+	   ((memq encoding '(nil 7bit 8bit binary))
 	    ;; Do nothing.
 	    t)
 	   ((memq encoding '(x-uuencode x-uue))
@@ -307,5 +304,5 @@
 
 (provide 'mm-bodies)
 
-;;; arch-tag: 41104bb6-4443-4ca9-8d5c-ff87ecf27d8d
+;; arch-tag: 41104bb6-4443-4ca9-8d5c-ff87ecf27d8d
 ;;; mm-bodies.el ends here
Index: gnus/lisp/mm-decode.el
diff -u gnus/lisp/mm-decode.el:7.64 gnus/lisp/mm-decode.el:7.66
--- gnus/lisp/mm-decode.el:7.64	Sun Mar  2 18:07:02 2008
+++ gnus/lisp/mm-decode.el	Thu Apr 24 06:19:20 2008
@@ -235,6 +235,9 @@
        ;; makes it possible to install another package which provides an
        ;; alternative implementation of diff-mode.  --Stef
        (fboundp 'diff-mode)))
+    ;; In case mime.types uses x-diff (as does Debian's mime-support-3.40).
+    ("text/x-diff" mm-display-patch-inline
+     (lambda (handle) (fboundp 'diff-mode)))
     ("application/emacs-lisp" mm-display-elisp-inline identity)
     ("application/x-emacs-lisp" mm-display-elisp-inline identity)
     ("text/dns" mm-display-dns-inline identity)
@@ -663,15 +666,16 @@
 
 (defun mm-copy-to-buffer ()
   "Copy the contents of the current buffer to a fresh buffer."
-    (let ((obuf (current-buffer))
-	  beg)
-      (goto-char (point-min))
-      (search-forward-regexp "^\n" nil t)
-      (setq beg (point))
+  (let ((obuf (current-buffer))
+        (mb (mm-multibyte-p))
+        beg)
+    (goto-char (point-min))
+    (search-forward-regexp "^\n" nil t)
+    (setq beg (point))
     (with-current-buffer
-       ;; Preserve the data's unibyteness (for url-insert-file-contents).
-       (let ((default-enable-multibyte-characters (mm-multibyte-p)))
-          (generate-new-buffer " *mm*"))
+          (generate-new-buffer " *mm*")
+      ;; Preserve the data's unibyteness (for url-insert-file-contents).
+      (mm-set-buffer-multibyte mb)
       (insert-buffer-substring obuf beg)
       (current-buffer))))
 
@@ -795,7 +799,7 @@
 	       (copiousoutput (assoc "copiousoutput" mime-info))
 	       file buffer)
 	  ;; We create a private sub-directory where we store our files.
-	  (set-file-modes dir 448)
+	  (set-file-modes dir #o700)
 	  (if filename
 	      (setq file (expand-file-name
 			  (gnus-map-function mm-file-name-rewrite-functions
@@ -815,6 +819,10 @@
 					    nil suffix))))
 	  (let ((coding-system-for-write mm-binary-coding-system))
 	    (write-region (point-min) (point-max) file nil 'nomesg))
+	  ;; The file is deleted after the viewer exists.  If the users edits
+	  ;; the file, changes will be lost.  Set file to read-only to make it
+	  ;; clear.
+	  (set-file-modes file #o400)
 	  (message "Viewing with %s" method)
 	  (cond
 	   (needsterm
@@ -1127,17 +1135,15 @@
 
 (defmacro mm-with-part (handle &rest forms)
   "Run FORMS in the temp buffer containing the contents of HANDLE."
-  `(let* ((handle ,handle)
-	  ;; The multibyteness of the temp buffer should be turned on
-	  ;; if inserting a multibyte string.  Contrarily, the buffer's
-	  ;; multibyteness should be off if inserting a unibyte string,
-	  ;; especially if a string contains 8bit data.
-	  (default-enable-multibyte-characters
-	    (with-current-buffer (mm-handle-buffer handle)
-	      (mm-multibyte-p))))
+  ;; The handle-buffer's content is a sequence of bytes, not a sequence of
+  ;; chars, so the buffer should be unibyte.  It may happen that the
+  ;; handle-buffer is multibyte for some reason, in which case now is a good
+  ;; time to adjust it, since we know at this point that it should
+  ;; be unibyte.
+  `(let* ((handle ,handle))
      (with-temp-buffer
-       (insert-buffer-substring (mm-handle-buffer handle))
        (mm-disable-multibyte)
+       (insert-buffer-substring (mm-handle-buffer handle))
        (mm-decode-content-transfer-encoding
 	(mm-handle-encoding handle)
 	(mm-handle-media-type handle))
@@ -1234,10 +1240,9 @@
       (setq filename (gnus-map-function mm-file-name-rewrite-functions
 					(file-name-nondirectory filename))))
     (setq file
-	  (mm-with-multibyte
-	   (read-file-name (or prompt "Save MIME part to: ")
-			   (or mm-default-directory default-directory)
-			   nil nil (or filename ""))))
+          (read-file-name (or prompt "Save MIME part to: ")
+                          (or mm-default-directory default-directory)
+                          nil nil (or filename "")))
     (setq mm-default-directory (file-name-directory file))
     (and (or (not (file-exists-p file))
 	     (yes-or-no-p (format "File %s already exists; overwrite? "
Index: gnus/lisp/mm-encode.el
diff -u gnus/lisp/mm-encode.el:7.12 gnus/lisp/mm-encode.el:7.14
--- gnus/lisp/mm-encode.el:7.12	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/mm-encode.el	Sat Apr 26 06:31:17 2008
@@ -96,14 +96,19 @@
       "application/octet-stream"
     (mailcap-extension-to-mime (match-string 0 file))))
 
-(defun mm-safer-encoding (encoding)
+(defun mm-safer-encoding (encoding &optional type)
   "Return an encoding similar to ENCODING but safer than it."
   (cond
    ((eq encoding '7bit) '7bit) ;; 7bit is considered safe.
-   ((memq encoding '(8bit quoted-printable)) 'quoted-printable)
+   ((memq encoding '(8bit quoted-printable))
+    ;; According to RFC2046, 5.2.1, RFC822 Subtype, "quoted-printable" is not
+    ;; a valid encoding for message/rfc822:
+    ;; No encoding other than "7bit", "8bit", or "binary" is permitted for the
+    ;; body of a "message/rfc822" entity.
+    (if (string= type "message/rfc822") '8bit 'quoted-printable))
    ;; The remaining encodings are binary and base64 (and perhaps some
    ;; non-standard ones), which are both turned into base64.
-   (t 'base64)))
+   (t (if (string= type "message/rfc822") 'binary 'base64))))
 
 (defun mm-encode-content-transfer-encoding (encoding &optional type)
   "Encode the current buffer with ENCODING for MIME type TYPE.
@@ -178,7 +183,7 @@
 			    (mm-qp-or-base64)
 			  (cadr (car rules)))))
 		   (if mm-use-ultra-safe-encoding
-		       (mm-safer-encoding encoding)
+		       (mm-safer-encoding encoding type)
 		     encoding))))
 	(pop rules)))))
 
@@ -206,5 +211,5 @@
 
 (provide 'mm-encode)
 
-;;; arch-tag: 7d01bba4-d469-4851-952b-dc863f84ed66
+;; arch-tag: 7d01bba4-d469-4851-952b-dc863f84ed66
 ;;; mm-encode.el ends here
Index: gnus/lisp/mm-extern.el
diff -u gnus/lisp/mm-extern.el:7.14 gnus/lisp/mm-extern.el:7.15
--- gnus/lisp/mm-extern.el:7.14	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/mm-extern.el	Thu Apr 24 06:19:21 2008
@@ -171,5 +171,5 @@
 
 (provide 'mm-extern)
 
-;;; arch-tag: 9653808e-14d9-4172-86e6-adceaa05378e
+;; arch-tag: 9653808e-14d9-4172-86e6-adceaa05378e
 ;;; mm-extern.el ends here
Index: gnus/lisp/mm-partial.el
diff -u gnus/lisp/mm-partial.el:7.9 gnus/lisp/mm-partial.el:7.10
--- gnus/lisp/mm-partial.el:7.9	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/mm-partial.el	Thu Apr 24 06:19:21 2008
@@ -152,5 +152,5 @@
 
 (provide 'mm-partial)
 
-;;; arch-tag: 460e7424-05f2-4a1d-a0f2-70ec081eff7d
+;; arch-tag: 460e7424-05f2-4a1d-a0f2-70ec081eff7d
 ;;; mm-partial.el ends here
Index: gnus/lisp/mm-url.el
diff -u gnus/lisp/mm-url.el:7.20 gnus/lisp/mm-url.el:7.21
--- gnus/lisp/mm-url.el:7.20	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/mm-url.el	Thu Apr 24 06:19:21 2008
@@ -457,5 +457,5 @@
 
 (provide 'mm-url)
 
-;;; arch-tag: 0594f9b3-417c-48b0-adc2-5082e1e7917f
+;; arch-tag: 0594f9b3-417c-48b0-adc2-5082e1e7917f
 ;;; mm-url.el ends here
Index: gnus/lisp/mm-util.el
diff -u gnus/lisp/mm-util.el:7.76 gnus/lisp/mm-util.el:7.77
--- gnus/lisp/mm-util.el:7.76	Sun Feb 24 16:39:37 2008
+++ gnus/lisp/mm-util.el	Thu Apr 24 06:19:20 2008
@@ -105,6 +105,7 @@
      (multibyte-string-p . ignore)
      (insert-byte . insert-char)
      (multibyte-char-to-unibyte . identity)
+     (set-buffer-multibyte . ignore)
      (special-display-p
       . (lambda (buffer-name)
 	  "Returns non-nil if a buffer named BUFFER-NAME gets a special frame."
@@ -1052,16 +1053,18 @@
 (defmacro mm-with-unibyte-buffer (&rest forms)
   "Create a temporary buffer, and evaluate FORMS there like `progn'.
 Use unibyte mode for this."
-  `(let (default-enable-multibyte-characters)
-     (with-temp-buffer ,@forms)))
+  `(with-temp-buffer
+     (mm-disable-multibyte)
+     ,@forms))
 (put 'mm-with-unibyte-buffer 'lisp-indent-function 0)
 (put 'mm-with-unibyte-buffer 'edebug-form-spec '(body))
 
 (defmacro mm-with-multibyte-buffer (&rest forms)
   "Create a temporary buffer, and evaluate FORMS there like `progn'.
 Use multibyte mode for this."
-  `(let ((default-enable-multibyte-characters t))
-     (with-temp-buffer ,@forms)))
+  `(with-temp-buffer
+     (mm-enable-multibyte)
+     ,@forms))
 (put 'mm-with-multibyte-buffer 'lisp-indent-function 0)
 (put 'mm-with-multibyte-buffer 'edebug-form-spec '(body))
 
Index: gnus/lisp/mm-uu.el
diff -u gnus/lisp/mm-uu.el:7.56 gnus/lisp/mm-uu.el:7.57
--- gnus/lisp/mm-uu.el:7.56	Sat Mar  1 02:48:13 2008
+++ gnus/lisp/mm-uu.el	Thu Apr 24 06:19:20 2008
@@ -280,11 +280,14 @@
 see `set-text-properties'.  If PROPERTIES equals t, this means to
 apply the face `mm-uu-extract'."
   (let ((obuf (current-buffer))
+        (multi (and (boundp 'enable-multibyte-characters)
+                    enable-multibyte-characters))
 	(coding-system
          ;; Might not exist in non-MULE XEmacs
          (when (boundp 'buffer-file-coding-system)
            buffer-file-coding-system)))
     (with-current-buffer (generate-new-buffer " *mm-uu*")
+      (if multi (mm-enable-multibyte) (mm-disable-multibyte))
       (setq buffer-file-coding-system coding-system)
       (insert-buffer-substring obuf from to)
       (cond ((eq properties  t)
@@ -441,8 +444,7 @@
   ;; This might not be exactly correct, but we sure can't get the
   ;; binary data from the article buffer, since that's already in a
   ;; non-binary charset.  So get it from the original article buffer. 
-  (mm-make-handle (save-excursion
-		    (set-buffer gnus-original-article-buffer)
+  (mm-make-handle (with-current-buffer gnus-original-article-buffer
 		    (mm-uu-copy-to-buffer start-point end-point))
 		  (list (or (and file-name
 				 (string-match "\\.[^\\.]+$" file-name)
Index: gnus/lisp/mm-view.el
diff -u gnus/lisp/mm-view.el:7.54 gnus/lisp/mm-view.el:7.55
--- gnus/lisp/mm-view.el:7.54	Fri Mar  7 07:24:30 2008
+++ gnus/lisp/mm-view.el	Thu Apr 24 06:19:20 2008
@@ -86,14 +86,14 @@
 
 (defun mm-inline-image-emacs (handle)
   (let ((b (point-marker))
-	buffer-read-only)
+	(inhibit-read-only t))
     (put-image (mm-get-image handle) b)
     (insert "\n\n")
     (mm-handle-set-undisplayer
      handle
      `(lambda ()
 	(let ((b ,b)
-	      buffer-read-only)
+	      (inhibit-read-only t))
 	  (remove-images b b)
 	  (delete-region b (+ b 2)))))))
 
@@ -102,12 +102,12 @@
     (insert "\n\n")
     (forward-char -2)
     (let ((annot (make-annotation (mm-get-image handle) nil 'text))
-	  buffer-read-only)
+	(inhibit-read-only t))
       (mm-handle-set-undisplayer
        handle
        `(lambda ()
 	  (let ((b ,(point-marker))
-		buffer-read-only)
+	      (inhibit-read-only t))
 	    (delete-annotation ,annot)
 	    (delete-region (- b 2) b))))
       (set-extent-property annot 'mm t)
@@ -194,13 +194,12 @@
 	(mm-handle-set-undisplayer
 	 handle
 	 `(lambda ()
-	    (let (buffer-read-only)
+	    (let ((inhibit-read-only t))
 	      ,@(if (functionp 'remove-specifier)
-		    '((mapcar (lambda (prop)
-				(remove-specifier
-				 (face-property 'default prop)
-				 (current-buffer)))
-			      '(background background-pixmap foreground))))
+                    '((dolist (prop '(background background-pixmap foreground))
+                        (remove-specifier
+                         (face-property 'default prop)
+                         (current-buffer)))))
 	      (delete-region ,(point-min-marker)
 			     ,(point-max-marker)))))))))
 
@@ -389,7 +388,7 @@
 (defun mm-inline-text-html (handle)
   (let* ((func (or mm-inline-text-html-renderer mm-text-html-renderer))
 	 (entry (assq func mm-text-html-renderer-alist))
-	 buffer-read-only)
+	 (inhibit-read-only t))
     (if entry
 	(setq func (cdr entry)))
     (cond
@@ -399,7 +398,7 @@
       (apply (car func) handle (cdr func))))))
 
 (defun mm-inline-text-vcard (handle)
-  (let (buffer-read-only)
+  (let ((inhibit-read-only t))
     (mm-insert-inline
      handle
      (concat "\n-- \n"
@@ -415,7 +414,7 @@
 	(type (mm-handle-media-subtype handle))
 	(charset (mail-content-type-get
 		  (mm-handle-type handle) 'charset))
-	buffer-read-only)
+	(inhibit-read-only t))
     (if (or (eq charset 'gnus-decoded)
 	    ;; This is probably not entirely correct, but
 	    ;; makes rfc822 parts with embedded multiparts work.
@@ -437,15 +436,14 @@
 	(goto-char (point-max))))
     (save-restriction
       (narrow-to-region b (point))
-      (when (or (equal type "enriched")
-		(equal type "richtext"))
-	(set-text-properties (point-min) (point-max) nil)
+      (when (member type '("enriched" "richtext"))
+        (set-text-properties (point-min) (point-max) nil)
 	(ignore-errors
 	  (enriched-decode (point-min) (point-max))))
       (mm-handle-set-undisplayer
        handle
        `(lambda ()
-	  (let (buffer-read-only)
+          (let ((inhibit-read-only t))
 	    (delete-region ,(point-min-marker)
 			   ,(point-max-marker))))))))
 
@@ -458,9 +456,9 @@
     (mm-handle-set-undisplayer
      handle
      `(lambda ()
-	(let (buffer-read-only)
-	  (delete-region ,(set-marker (make-marker) b)
-			 ,(set-marker (make-marker) (point))))))))
+	(let ((inhibit-read-only t))
+	  (delete-region ,(copy-marker b)
+			 ,(copy-marker (point))))))))
 
 (defun mm-inline-audio (handle)
   (message "Not implemented"))
@@ -527,13 +525,12 @@
 	(mm-handle-set-undisplayer
 	 handle
 	 `(lambda ()
-	    (let (buffer-read-only)
+	    (let ((inhibit-read-only t))
 	      (if (fboundp 'remove-specifier)
 		  ;; This is only valid on XEmacs.
-		  (mapcar (lambda (prop)
-			    (remove-specifier
-			     (face-property 'default prop) (current-buffer)))
-			  '(background background-pixmap foreground)))
+		  (dolist (prop '(background background-pixmap foreground))
+		    (remove-specifier
+		     (face-property 'default prop) (current-buffer))))
 	      (delete-region ,(point-min-marker) ,(point-max-marker)))))))))
 
 (defun mm-display-inline-fontify (handle mode)
@@ -605,22 +602,20 @@
 ;;      id-signedData OBJECT IDENTIFIER ::= { iso(1) member-body(2)
 ;;          us(840) rsadsi(113549) pkcs(1) pkcs7(7) 2 }
 (defvar mm-pkcs7-signed-magic
-  (mm-string-as-unibyte
-   (mapconcat 'char-to-string
-	      (list ?\x30 ?\x5c ?\x28 ?\x80 ?\x5c ?\x7c ?\x81 ?\x2e ?\x5c
-		    ?\x7c ?\x82 ?\x2e ?\x2e ?\x5c ?\x7c ?\x83 ?\x2e ?\x2e
-		    ?\x2e ?\x5c ?\x29 ?\x06 ?\x09 ?\x5c ?\x2a ?\x86 ?\x48
-		    ?\x86 ?\xf7 ?\x0d ?\x01 ?\x07 ?\x02) "")))
+  (funcall (if (fboundp 'unibyte-string) 'unibyte-string 'string)
+   ?\x30 ?\x5c ?\x28 ?\x80 ?\x5c ?\x7c ?\x81 ?\x2e ?\x5c
+   ?\x7c ?\x82 ?\x2e ?\x2e ?\x5c ?\x7c ?\x83 ?\x2e ?\x2e
+   ?\x2e ?\x5c ?\x29 ?\x06 ?\x09 ?\x5c ?\x2a ?\x86 ?\x48
+   ?\x86 ?\xf7 ?\x0d ?\x01 ?\x07 ?\x02))
 
 ;;      id-envelopedData OBJECT IDENTIFIER ::= { iso(1) member-body(2)
 ;;          us(840) rsadsi(113549) pkcs(1) pkcs7(7) 3 }
 (defvar mm-pkcs7-enveloped-magic
-  (mm-string-as-unibyte
-   (mapconcat 'char-to-string
-	      (list ?\x30 ?\x5c ?\x28 ?\x80 ?\x5c ?\x7c ?\x81 ?\x2e ?\x5c
-		    ?\x7c ?\x82 ?\x2e ?\x2e ?\x5c ?\x7c ?\x83 ?\x2e ?\x2e
-		    ?\x2e ?\x5c ?\x29 ?\x06 ?\x09 ?\x5c ?\x2a ?\x86 ?\x48
-		    ?\x86 ?\xf7 ?\x0d ?\x01 ?\x07 ?\x03) "")))
+  (funcall (if (fboundp 'unibyte-string) 'unibyte-string 'string)
+   ?\x30 ?\x5c ?\x28 ?\x80 ?\x5c ?\x7c ?\x81 ?\x2e ?\x5c
+   ?\x7c ?\x82 ?\x2e ?\x2e ?\x5c ?\x7c ?\x83 ?\x2e ?\x2e
+   ?\x2e ?\x5c ?\x29 ?\x06 ?\x09 ?\x5c ?\x2a ?\x86 ?\x48
+   ?\x86 ?\xf7 ?\x0d ?\x01 ?\x07 ?\x03))
 
 (defun mm-view-pkcs7-get-type (handle)
   (mm-with-unibyte-buffer
@@ -681,5 +676,5 @@
 
 (provide 'mm-view)
 
-;;; arch-tag: b60e749a-d05c-47f2-bccd-bdaa59327cb2
+;; arch-tag: b60e749a-d05c-47f2-bccd-bdaa59327cb2
 ;;; mm-view.el ends here
Index: gnus/lisp/mml-sec.el
diff -u gnus/lisp/mml-sec.el:7.22 gnus/lisp/mml-sec.el:7.23
--- gnus/lisp/mml-sec.el:7.22	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/mml-sec.el	Thu Apr 24 06:19:21 2008
@@ -380,5 +380,5 @@
 
 (provide 'mml-sec)
 
-;;; arch-tag: 111c56e7-df5e-4287-87d7-93ed2911ec6c
+;; arch-tag: 111c56e7-df5e-4287-87d7-93ed2911ec6c
 ;;; mml-sec.el ends here
Index: gnus/lisp/mml-smime.el
diff -u gnus/lisp/mml-smime.el:7.21 gnus/lisp/mml-smime.el:7.22
--- gnus/lisp/mml-smime.el:7.21	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/mml-smime.el	Thu Apr 24 06:19:20 2008
@@ -552,5 +552,5 @@
 
 (provide 'mml-smime)
 
-;;; arch-tag: f1bf94d4-f2cd-4c6f-b059-ad69492817e2
+;; arch-tag: f1bf94d4-f2cd-4c6f-b059-ad69492817e2
 ;;; mml-smime.el ends here
Index: gnus/lisp/mml.el
diff -u gnus/lisp/mml.el:7.65 gnus/lisp/mml.el:7.66
--- gnus/lisp/mml.el:7.65	Thu Mar 20 19:12:45 2008
+++ gnus/lisp/mml.el	Thu Apr 24 06:19:21 2008
@@ -1516,5 +1516,5 @@
 
 (provide 'mml)
 
-;;; arch-tag: 583c96cf-1ffe-451b-a5e5-4733ae9ddd12
+;; arch-tag: 583c96cf-1ffe-451b-a5e5-4733ae9ddd12
 ;;; mml.el ends here
Index: gnus/lisp/mml1991.el
diff -u gnus/lisp/mml1991.el:7.25 gnus/lisp/mml1991.el:7.26
--- gnus/lisp/mml1991.el:7.25	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/mml1991.el	Thu Apr 24 06:19:20 2008
@@ -520,5 +520,5 @@
 ;; coding: iso-8859-1
 ;; End:
 
-;;; arch-tag: e542be18-ab28-4393-9b33-97fe9cf30706
+;; arch-tag: e542be18-ab28-4393-9b33-97fe9cf30706
 ;;; mml1991.el ends here
Index: gnus/lisp/mml2015.el
diff -u gnus/lisp/mml2015.el:7.53 gnus/lisp/mml2015.el:7.54
--- gnus/lisp/mml2015.el:7.53	Mon Mar 10 09:59:56 2008
+++ gnus/lisp/mml2015.el	Thu Apr 24 06:19:20 2008
@@ -1422,5 +1422,5 @@
 
 (provide 'mml2015)
 
-;;; arch-tag: b04701d5-0b09-44d8-bed8-de901bf435f2
+;; arch-tag: b04701d5-0b09-44d8-bed8-de901bf435f2
 ;;; mml2015.el ends here
Index: gnus/lisp/netrc.el
diff -u gnus/lisp/netrc.el:7.21 gnus/lisp/netrc.el:7.22
--- gnus/lisp/netrc.el:7.21	Mon Mar 10 01:53:11 2008
+++ gnus/lisp/netrc.el	Thu Apr 24 06:19:20 2008
@@ -210,5 +210,5 @@
 
 (provide 'netrc)
 
-;;; arch-tag: af9929cc-2d12-482f-936e-eb4366f9fa55
+;; arch-tag: af9929cc-2d12-482f-936e-eb4366f9fa55
 ;;; netrc.el ends here
Index: gnus/lisp/nnagent.el
diff -u gnus/lisp/nnagent.el:7.15 gnus/lisp/nnagent.el:7.16
--- gnus/lisp/nnagent.el:7.15	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/nnagent.el	Thu Apr 24 06:19:20 2008
@@ -263,5 +263,5 @@
 
 (provide 'nnagent)
 
-;;; arch-tag: af710b77-f816-4969-af31-6fd94fb42245
+;; arch-tag: af710b77-f816-4969-af31-6fd94fb42245
 ;;; nnagent.el ends here
Index: gnus/lisp/nnbabyl.el
diff -u gnus/lisp/nnbabyl.el:7.11 gnus/lisp/nnbabyl.el:7.12
--- gnus/lisp/nnbabyl.el:7.11	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/nnbabyl.el	Thu Apr 24 06:19:21 2008
@@ -665,5 +665,5 @@
 
 (provide 'nnbabyl)
 
-;;; arch-tag: aa7ddedb-8c07-4c0e-beb0-58e795c2b81b
+;; arch-tag: aa7ddedb-8c07-4c0e-beb0-58e795c2b81b
 ;;; nnbabyl.el ends here
Index: gnus/lisp/nndb.el
diff -u gnus/lisp/nndb.el:7.16 gnus/lisp/nndb.el:7.17
--- gnus/lisp/nndb.el:7.16	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/nndb.el	Thu Apr 24 06:19:20 2008
@@ -323,5 +323,5 @@
 
 (provide 'nndb)
 
-;;; arch-tag: 83bd6fb4-58d9-4fed-a901-c6c625ad5f8a
+;; arch-tag: 83bd6fb4-58d9-4fed-a901-c6c625ad5f8a
 ;;; nndb.el ends here
Index: gnus/lisp/nndiary.el
diff -u gnus/lisp/nndiary.el:7.19 gnus/lisp/nndiary.el:7.20
--- gnus/lisp/nndiary.el:7.19	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/nndiary.el	Thu Apr 24 06:19:21 2008
@@ -1587,5 +1587,5 @@
 (provide 'nndiary)
 
 
-;;; arch-tag: 9c542b95-92e7-4ace-a038-330ab296e203
+;; arch-tag: 9c542b95-92e7-4ace-a038-330ab296e203
 ;;; nndiary.el ends here
Index: gnus/lisp/nndir.el
diff -u gnus/lisp/nndir.el:7.9 gnus/lisp/nndir.el:7.10
--- gnus/lisp/nndir.el:7.9	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/nndir.el	Thu Apr 24 06:19:21 2008
@@ -98,5 +98,5 @@
 
 (provide 'nndir)
 
-;;; arch-tag: 56f09f68-0e4e-4816-818a-df80b4a394c8
+;; arch-tag: 56f09f68-0e4e-4816-818a-df80b4a394c8
 ;;; nndir.el ends here
Index: gnus/lisp/nndoc.el
diff -u gnus/lisp/nndoc.el:7.13 gnus/lisp/nndoc.el:7.14
--- gnus/lisp/nndoc.el:7.13	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/nndoc.el	Thu Apr 24 06:19:20 2008
@@ -689,7 +689,7 @@
   (looking-at "JMF"))
 
 (defun nndoc-oe-dbx-type-p ()
-  (looking-at (mm-string-as-multibyte "\317\255\022\376")))
+  (looking-at (mm-string-to-multibyte "\317\255\022\376")))
 
 (defun nndoc-read-little-endian ()
   (+ (prog1 (char-after) (forward-char 1))
@@ -1027,5 +1027,5 @@
 
 (provide 'nndoc)
 
-;;; arch-tag: f5c2970e-0387-47ac-a0b3-6cc317dffabe
+;; arch-tag: f5c2970e-0387-47ac-a0b3-6cc317dffabe
 ;;; nndoc.el ends here
Index: gnus/lisp/nndraft.el
diff -u gnus/lisp/nndraft.el:7.12 gnus/lisp/nndraft.el:7.13
--- gnus/lisp/nndraft.el:7.12	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/nndraft.el	Thu Apr 24 06:19:20 2008
@@ -315,5 +315,5 @@
 
 (provide 'nndraft)
 
-;;; arch-tag: 3ce26ca0-41cb-48b1-8703-4dad35e188aa
+;; arch-tag: 3ce26ca0-41cb-48b1-8703-4dad35e188aa
 ;;; nndraft.el ends here
Index: gnus/lisp/nneething.el
diff -u gnus/lisp/nneething.el:7.12 gnus/lisp/nneething.el:7.13
--- gnus/lisp/nneething.el:7.12	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/nneething.el	Thu Apr 24 06:19:20 2008
@@ -428,5 +428,5 @@
 
 (provide 'nneething)
 
-;;; arch-tag: 1277f386-88f2-4459-bb24-f3f45962a6c5
+;; arch-tag: 1277f386-88f2-4459-bb24-f3f45962a6c5
 ;;; nneething.el ends here
Index: gnus/lisp/nnfolder.el
diff -u gnus/lisp/nnfolder.el:7.21 gnus/lisp/nnfolder.el:7.22
--- gnus/lisp/nnfolder.el:7.21	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/nnfolder.el	Thu Apr 24 06:19:20 2008
@@ -1302,5 +1302,5 @@
 
 (provide 'nnfolder)
 
-;;; arch-tag: a040d0f4-4f4e-445f-8972-839575c5f7e6
+;; arch-tag: a040d0f4-4f4e-445f-8972-839575c5f7e6
 ;;; nnfolder.el ends here
Index: gnus/lisp/nngateway.el
diff -u gnus/lisp/nngateway.el:7.8 gnus/lisp/nngateway.el:7.9
--- gnus/lisp/nngateway.el:7.8	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/nngateway.el	Thu Apr 24 06:19:20 2008
@@ -91,5 +91,5 @@
 
 (provide 'nngateway)
 
-;;; arch-tag: f7ecb92e-b10c-43d5-9a9b-1314233341fc
+;; arch-tag: f7ecb92e-b10c-43d5-9a9b-1314233341fc
 ;;; nngateway.el ends here
Index: gnus/lisp/nnheader.el
diff -u gnus/lisp/nnheader.el:7.31 gnus/lisp/nnheader.el:7.32
--- gnus/lisp/nnheader.el:7.31	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/nnheader.el	Thu Apr 24 06:19:21 2008
@@ -572,12 +572,11 @@
 
 (defun nnheader-init-server-buffer ()
   "Initialize the Gnus-backend communication buffer."
-  (save-excursion
-    (unless (gnus-buffer-live-p nntp-server-buffer)
-      (setq nntp-server-buffer (get-buffer-create " *nntpd*")))
-    (set-buffer nntp-server-buffer)
-    (mm-enable-multibyte)
+  (unless (gnus-buffer-live-p nntp-server-buffer)
+    (setq nntp-server-buffer (get-buffer-create " *nntpd*")))
+  (with-current-buffer nntp-server-buffer
     (erase-buffer)
+    (mm-enable-multibyte)
     (kill-all-local-variables)
     (setq case-fold-search t)		;Should ignore case.
     (set (make-local-variable 'nntp-process-response) nil)
@@ -1060,7 +1059,6 @@
 
 (defalias 'nnheader-cancel-timer 'cancel-timer)
 (defalias 'nnheader-cancel-function-timers 'cancel-function-timers)
-(defalias 'nnheader-string-as-multibyte 'string-as-multibyte)
 
 (defun nnheader-accept-process-output (process)
   (accept-process-output
@@ -1077,5 +1075,5 @@
 
 (provide 'nnheader)
 
-;;; arch-tag: a9c4b7d9-52ae-4ec9-b196-dfd93124d202
+;; arch-tag: a9c4b7d9-52ae-4ec9-b196-dfd93124d202
 ;;; nnheader.el ends here
Index: gnus/lisp/nnimap.el
diff -u gnus/lisp/nnimap.el:7.46 gnus/lisp/nnimap.el:7.47
--- gnus/lisp/nnimap.el:7.46	Wed Apr  2 16:46:57 2008
+++ gnus/lisp/nnimap.el	Thu Apr 24 06:19:20 2008
@@ -617,7 +617,9 @@
 	      lines (imap-body-lines (imap-message-body imap-current-message))
 	      chars (imap-message-get imap-current-message 'RFC822.SIZE)))
       (nnheader-insert-nov
-       (with-temp-buffer
+       ;; At this stage, we only have bytes, so let's use unibyte buffers
+       ;; to make it more clear.
+       (mm-with-unibyte-buffer
 	 (buffer-disable-undo)
 	 (insert headers)
 	 (let ((head (nnheader-parse-naked-head uid)))
@@ -1553,8 +1555,7 @@
 	;; request the article only when the move is NOT internal
 	(and (or move-is-internal
 		 (nnimap-request-article article group server))
-	     (save-excursion
-	       (set-buffer buf)
+	     (with-current-buffer buf
 	       (buffer-disable-undo (current-buffer))
 	       (insert-buffer-substring nntp-server-buffer)
 	       (setq result (eval accept-form))
Index: gnus/lisp/nnkiboze.el
diff -u gnus/lisp/nnkiboze.el:7.13 gnus/lisp/nnkiboze.el:7.14
--- gnus/lisp/nnkiboze.el:7.13	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/nnkiboze.el	Thu Apr 24 06:19:20 2008
@@ -388,5 +388,5 @@
 
 (provide 'nnkiboze)
 
-;;; arch-tag: 66068271-bdc9-4801-bcde-779702e73a05
+;; arch-tag: 66068271-bdc9-4801-bcde-779702e73a05
 ;;; nnkiboze.el ends here
Index: gnus/lisp/nnlistserv.el
diff -u gnus/lisp/nnlistserv.el:7.11 gnus/lisp/nnlistserv.el:7.12
--- gnus/lisp/nnlistserv.el:7.11	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/nnlistserv.el	Thu Apr 24 06:19:20 2008
@@ -150,5 +150,5 @@
 
 (provide 'nnlistserv)
 
-;;; arch-tag: 7705176f-d332-4a5e-a520-d0d319445617
+;; arch-tag: 7705176f-d332-4a5e-a520-d0d319445617
 ;;; nnlistserv.el ends here
Index: gnus/lisp/nnmail.el
diff -u gnus/lisp/nnmail.el:7.42 gnus/lisp/nnmail.el:7.43
--- gnus/lisp/nnmail.el:7.42	Sat Mar  1 02:48:13 2008
+++ gnus/lisp/nnmail.el	Thu Apr 24 06:19:20 2008
@@ -2049,5 +2049,5 @@
 
 (provide 'nnmail)
 
-;;; arch-tag: fe8f671a-50db-428a-bb5d-f00462f72ed7
+;; arch-tag: fe8f671a-50db-428a-bb5d-f00462f72ed7
 ;;; nnmail.el ends here
Index: gnus/lisp/nnmaildir.el
diff -u gnus/lisp/nnmaildir.el:7.18 gnus/lisp/nnmaildir.el:7.19
--- gnus/lisp/nnmaildir.el:7.18	Sun Dec 16 05:23:18 2007
+++ gnus/lisp/nnmaildir.el	Thu Apr 24 06:19:21 2008
@@ -1669,5 +1669,5 @@
 ;; fill-column: 77
 ;; End:
 
-;;; arch-tag: 0c4e44cd-dfde-4040-888e-5597ec771849
+;; arch-tag: 0c4e44cd-dfde-4040-888e-5597ec771849
 ;;; nnmaildir.el ends here
Index: gnus/lisp/nnmbox.el
diff -u gnus/lisp/nnmbox.el:7.11 gnus/lisp/nnmbox.el:7.12
--- gnus/lisp/nnmbox.el:7.11	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/nnmbox.el	Thu Apr 24 06:19:21 2008
@@ -715,5 +715,5 @@
 
 (provide 'nnmbox)
 
-;;; arch-tag: 611dd95f-be37-413a-b3ae-8b059ba93659
+;; arch-tag: 611dd95f-be37-413a-b3ae-8b059ba93659
 ;;; nnmbox.el ends here
Index: gnus/lisp/nnmh.el
diff -u gnus/lisp/nnmh.el:7.13 gnus/lisp/nnmh.el:7.14
--- gnus/lisp/nnmh.el:7.13	Tue Mar 18 23:59:24 2008
+++ gnus/lisp/nnmh.el	Thu Apr 24 06:19:20 2008
@@ -77,8 +77,7 @@
 (nnoo-define-basics nnmh)
 
 (deffoo nnmh-retrieve-headers (articles &optional newsgroup server fetch-old)
-  (save-excursion
-    (set-buffer nntp-server-buffer)
+  (with-current-buffer nntp-server-buffer
     (erase-buffer)
     (let* ((file nil)
 	   (number (length articles))
@@ -225,8 +224,7 @@
     (let ((files (mapcar 'string-to-number
 			 (directory-files dir nil "^[0-9]+$" t))))
       (when files
-	(save-excursion
-	  (set-buffer nntp-server-buffer)
+	(with-current-buffer nntp-server-buffer
 	  (goto-char (point-max))
 	  (insert
 	   (format
@@ -237,7 +235,7 @@
 		(file-truename (file-name-as-directory
 				(expand-file-name nnmh-toplev))))
 	       dir)
-	      (mm-string-as-multibyte
+	      (mm-string-to-multibyte   ;Why?  Isn't it multibyte already?
 	       (mm-encode-coding-string
 		(nnheader-replace-chars-in-string
 		 (substring dir (match-end 0))
@@ -298,8 +296,7 @@
     (and
      (nnmh-deletable-article-p group article)
      (nnmh-request-article article group server)
-     (save-excursion
-       (set-buffer buf)
+     (with-current-buffer buf
        (erase-buffer)
        (insert-buffer-substring nntp-server-buffer)
        (setq result (eval accept-form))
@@ -339,8 +336,7 @@
 
 (deffoo nnmh-request-replace-article (article group buffer)
   (nnmh-possibly-change-directory group)
-  (save-excursion
-    (set-buffer buffer)
+  (with-current-buffer buffer
     (nnmh-possibly-create-directory group)
     (ignore-errors
       (nnmail-write-region
@@ -580,5 +576,5 @@
 
 (provide 'nnmh)
 
-;;; arch-tag: 36c12a98-3bad-44b3-9953-628078ef0e04
+;; arch-tag: 36c12a98-3bad-44b3-9953-628078ef0e04
 ;;; nnmh.el ends here
Index: gnus/lisp/nnml.el
diff -u gnus/lisp/nnml.el:7.28 gnus/lisp/nnml.el:7.29
--- gnus/lisp/nnml.el:7.28	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/nnml.el	Thu Apr 24 06:19:20 2008
@@ -1309,5 +1309,5 @@
 
 (provide 'nnml)
 
-;;; arch-tag: 52c97dc3-9735-45de-b439-9e4d23b52004
+;; arch-tag: 52c97dc3-9735-45de-b439-9e4d23b52004
 ;;; nnml.el ends here
Index: gnus/lisp/nnnil.el
diff -u gnus/lisp/nnnil.el:7.6 gnus/lisp/nnnil.el:7.7
--- gnus/lisp/nnnil.el:7.6	Sun Dec  9 01:04:21 2007
+++ gnus/lisp/nnnil.el	Thu Apr 24 06:19:21 2008
@@ -81,4 +81,4 @@
 
 (provide 'nnnil)
 
-;;; arch-tag: a982a1a3-bc5e-4fb1-a233-d7657a3e3257
+;; arch-tag: a982a1a3-bc5e-4fb1-a233-d7657a3e3257
Index: gnus/lisp/nnoo.el
diff -u gnus/lisp/nnoo.el:7.9 gnus/lisp/nnoo.el:7.10
--- gnus/lisp/nnoo.el:7.9	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/nnoo.el	Thu Apr 24 06:19:20 2008
@@ -324,5 +324,5 @@
 
 (provide 'nnoo)
 
-;;; arch-tag: 0196b5ed-6f34-4778-a455-73a971f837e7
+;; arch-tag: 0196b5ed-6f34-4778-a455-73a971f837e7
 ;;; nnoo.el ends here
Index: gnus/lisp/nnrss.el
diff -u gnus/lisp/nnrss.el:7.55 gnus/lisp/nnrss.el:7.56
--- gnus/lisp/nnrss.el:7.55	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/nnrss.el	Thu Apr 24 06:19:21 2008
@@ -1131,7 +1131,5 @@
 
 (provide 'nnrss)
 
-
+;; arch-tag: 12910c07-0cdf-44fb-8d2c-416ded64c267
 ;;; nnrss.el ends here
-
-;;; arch-tag: 12910c07-0cdf-44fb-8d2c-416ded64c267
Index: gnus/lisp/nnslashdot.el
diff -u gnus/lisp/nnslashdot.el:7.15 gnus/lisp/nnslashdot.el:7.16
--- gnus/lisp/nnslashdot.el:7.15	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/nnslashdot.el	Thu Apr 24 06:19:21 2008
@@ -503,5 +503,5 @@
 
 (provide 'nnslashdot)
 
-;;; arch-tag: aa73df7a-f7e6-4eef-bdea-5ce2f8c691b3
+;; arch-tag: aa73df7a-f7e6-4eef-bdea-5ce2f8c691b3
 ;;; nnslashdot.el ends here
Index: gnus/lisp/nnsoup.el
diff -u gnus/lisp/nnsoup.el:7.13 gnus/lisp/nnsoup.el:7.14
--- gnus/lisp/nnsoup.el:7.13	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/nnsoup.el	Thu Apr 24 06:19:21 2008
@@ -810,5 +810,5 @@
 
 (provide 'nnsoup)
 
-;;; arch-tag: b0451389-5703-4450-9425-f66f6b38c828
+;; arch-tag: b0451389-5703-4450-9425-f66f6b38c828
 ;;; nnsoup.el ends here
Index: gnus/lisp/nnspool.el
diff -u gnus/lisp/nnspool.el:7.14 gnus/lisp/nnspool.el:7.15
--- gnus/lisp/nnspool.el:7.14	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/nnspool.el	Thu Apr 24 06:19:20 2008
@@ -458,5 +458,5 @@
 
 (provide 'nnspool)
 
-;;; arch-tag: bdac8d27-2934-4eee-bad0-49e6b90c0d05
+;; arch-tag: bdac8d27-2934-4eee-bad0-49e6b90c0d05
 ;;; nnspool.el ends here
Index: gnus/lisp/nntp.el
diff -u gnus/lisp/nntp.el:7.46 gnus/lisp/nntp.el:7.47
--- gnus/lisp/nntp.el:7.46	Wed Mar 12 02:27:58 2008
+++ gnus/lisp/nntp.el	Thu Apr 24 06:19:21 2008
@@ -84,11 +84,12 @@
 - `nntp-open-network-stream' (the default),
 - `nntp-open-ssl-stream',
 - `nntp-open-tls-stream',
+- `nntp-open-netcat-stream'.
 - `nntp-open-telnet-stream'.
 
 Indirect connections:
-- `nntp-open-via-rlogin-and-telnet',
 - `nntp-open-via-rlogin-and-netcat',
+- `nntp-open-via-rlogin-and-telnet',
 - `nntp-open-via-telnet-and-telnet'.")
 
 (defvoo nntp-never-echoes-commands nil
@@ -143,12 +144,13 @@
 (defvoo nntp-via-telnet-switches '("-8")
   "*Switches given to the telnet command `nntp-via-telnet-command'.")
 
-(defvoo nntp-via-netcat-command "nc"
+(defvoo nntp-netcat-command "nc"
   "*Netcat command used to connect to the nntp server.
-This command is used by the `nntp-open-via-rlogin-and-netcat' method.")
+This command is used by the `nntp-open-netcat-stream' and
+`nntp-open-via-rlogin-and-netcat' methods.")
 
-(defvoo nntp-via-netcat-switches nil
-  "*Switches given to the netcat command `nntp-via-netcat-command'.")
+(defvoo nntp-netcat-switches nil
+  "*Switches given to the netcat command `nntp-netcat-command'.")
 
 (defvoo nntp-via-user-name nil
   "*User name to log in on an intermediate host with.
@@ -335,8 +337,7 @@
 
 (defun nntp-record-command (string)
   "Record the command STRING."
-  (save-excursion
-    (set-buffer (get-buffer-create "*nntp-log*"))
+  (with-current-buffer (get-buffer-create "*nntp-log*")
     (goto-char (point-max))
     (let ((time (current-time)))
       (insert (format-time-string "%Y%m%dT%H%M%S" time)
@@ -393,8 +394,7 @@
 (defsubst nntp-wait-for (process wait-for buffer &optional decode discard)
   "Wait for WAIT-FOR to arrive from PROCESS."
 
-  (save-excursion
-    (set-buffer (process-buffer process))
+  (with-current-buffer (process-buffer process)
     (goto-char (point-min))
 
     (while (and (or (not (memq (char-after (point)) '(?2 ?3 ?4 ?5)))
@@ -432,8 +432,7 @@
 	      (setq nntp-process-response response)))
 	  (nntp-decode-text (not decode))
 	  (unless discard
-	    (save-excursion
-	      (set-buffer buffer)
+	    (with-current-buffer buffer
 	      (goto-char (point-max))
 	      (nntp-insert-buffer-substring (process-buffer process))
 	      ;; Nix out "nntp reading...." message.
@@ -539,8 +538,7 @@
 		       nntp-open-connection-function
 		       nntp-open-connection-functions-never-echo-commands))
 	    (nntp-accept-response)
-	    (save-excursion
-	      (set-buffer buffer)
+	    (with-current-buffer buffer
 	      (goto-char pos)
 	      (if (looking-at (regexp-quote command))
 		  (delete-region pos (progn (forward-line 1)
@@ -563,8 +561,7 @@
 	  ;; If nothing to wait for, still remove possibly echo'ed commands
 	  (unless wait-for
 	    (nntp-accept-response)
-	    (save-excursion
-	      (set-buffer buffer)
+	    (with-current-buffer buffer
 	      (goto-char pos)
 	      (if (looking-at (regexp-quote command))
 		  (delete-region pos (progn (forward-line 1)
@@ -590,8 +587,7 @@
 	  ;; If nothing to wait for, still remove possibly echo'ed commands
 	  (unless wait-for
 	    (nntp-accept-response)
-	    (save-excursion
-	      (set-buffer buffer)
+	    (with-current-buffer buffer
 	      (goto-char pos)
 	      (if (looking-at (regexp-quote command))
 		  (delete-region pos (progn (forward-line 1) (point-at-bol))))
@@ -607,10 +603,12 @@
     (nntp-erase-buffer
      (nntp-find-connection-buffer nntp-server-buffer)))
   (nntp-encode-text)
-  (mm-with-unibyte-current-buffer
-    ;; Some encoded unicode text contains character 0x80-0x9f e.g. Euro.
-    (process-send-region (nntp-find-connection nntp-server-buffer)
-			 (point-min) (point-max)))
+  ;; Make sure we did not forget to encode some of the content.
+  (assert (save-excursion (goto-char (point-min))
+                          (not (re-search-forward "[^\000-\377]" nil t))))
+  (mm-disable-multibyte)
+  (process-send-region (nntp-find-connection nntp-server-buffer)
+                       (point-min) (point-max))
   (nntp-retrieve-data
    nil nntp-address nntp-port-number nntp-server-buffer
    wait-for nnheader-callback-function))
@@ -648,67 +646,79 @@
   (defvar nntp-with-open-group-internal nil)
   (defvar nntp-report-n nil))
 
+(defun nntp-with-open-group-function (-group -server -connectionless -bodyfun)
+  "Protect against servers that don't like clients that keep idle connections opens.
+The problem being that these servers may either close a connection or
+simply ignore any further requests on a connection.  Closed
+connections are not detected until `accept-process-output' has updated
+the `process-status'.  Dropped connections are not detected until the
+connection timeouts (which may be several minutes) or
+`nntp-connection-timeout' has expired.  When these occur
+`nntp-with-open-group', opens a new connection then re-issues the NNTP
+command whose response triggered the error."
+  (letf ((nntp-report-n (symbol-function 'nntp-report))
+         ((symbol-function 'nntp-report) (symbol-function 'nntp-report-1))
+         (nntp-with-open-group-internal nil))
+    (while (catch 'nntp-with-open-group-error
+             ;; Open the connection to the server
+             ;; NOTE: Existing connections are NOT tested.
+             (nntp-possibly-change-group -group -server -connectionless)
+
+             (let ((-timer
+                    (and nntp-connection-timeout
+                         (run-at-time
+                          nntp-connection-timeout nil
+                          (lambda ()
+                            (let* ((-process (nntp-find-connection
+                                             nntp-server-buffer))
+                                   (-buffer  (and -process
+                                                  (process-buffer -process))))
+                              ;; When I an able to identify the
+                              ;; connection to the server AND I've
+                              ;; received NO reponse for
+                              ;; nntp-connection-timeout seconds.
+                              (when (and -buffer (eq 0 (buffer-size -buffer)))
+                                ;; Close the connection.  Take no
+                                ;; other action as the accept input
+                                ;; code will handle the closed
+                                ;; connection.
+                                (nntp-kill-buffer -buffer))))))))
+               (unwind-protect
+                   (setq nntp-with-open-group-internal
+                         (condition-case nil
+                             (funcall -bodyfun)
+                           (quit
+                            (unless debug-on-quit
+                              (nntp-close-server))
+                            (signal 'quit nil))))
+                 (when -timer
+                   (nnheader-cancel-timer -timer)))
+               nil))
+      (setf (symbol-function 'nntp-report) nntp-report-n))
+    nntp-with-open-group-internal))
+
 (defmacro nntp-with-open-group (group server &optional connectionless &rest forms)
   "Protect against servers that don't like clients that keep idle connections opens.
 The problem being that these servers may either close a connection or
 simply ignore any further requests on a connection.  Closed
-connections are not detected until accept-process-output has updated
-the process-status.  Dropped connections are not detected until the
+connections are not detected until `accept-process-output' has updated
+the `process-status'.  Dropped connections are not detected until the
 connection timeouts (which may be several minutes) or
-nntp-connection-timeout has expired.  When these occur
-nntp-with-open-group, opens a new connection then re-issues the NNTP
+`nntp-connection-timeout' has expired.  When these occur
+`nntp-with-open-group', opens a new connection then re-issues the NNTP
 command whose response triggered the error."
+  (declare (indent 2) (debug (form form [&optional symbolp] def-body)))
   (when (and (listp connectionless)
 	     (not (eq connectionless nil)))
     (setq forms (cons connectionless forms)
 	  connectionless nil))
-  `(letf ((nntp-report-n (symbol-function 'nntp-report))
-	  ((symbol-function 'nntp-report) (symbol-function 'nntp-report-1))
-	  (nntp-with-open-group-internal nil))
-     (while (catch 'nntp-with-open-group-error
-	      ;; Open the connection to the server
-	      ;; NOTE: Existing connections are NOT tested.
-	      (nntp-possibly-change-group ,group ,server ,connectionless)
-
-	      (let ((timer
-		     (and nntp-connection-timeout
-			  (run-at-time
-			   nntp-connection-timeout nil
-			   '(lambda ()
-			      (let ((process (nntp-find-connection
-					      nntp-server-buffer))
-				    (buffer  (and process
-						  (process-buffer process))))
-				;; When I am able to identify the
-				;; connection to the server AND I've
-				;; received NO reponse for
-				;; nntp-connection-timeout seconds.
-				(when (and buffer (eq 0 (buffer-size buffer)))
-				  ;; Close the connection.  Take no
-				  ;; other action as the accept input
-				  ;; code will handle the closed
-				  ;; connection.
-				  (nntp-kill-buffer buffer))))))))
-		(unwind-protect
-		    (setq nntp-with-open-group-internal
-                          (condition-case nil
-			      (progn ,@forms)
-			    (quit
-			     (unless debug-on-quit
-			       (nntp-close-server))
-                             (signal 'quit nil))))
-		  (when timer
-		    (nnheader-cancel-timer timer)))
-		nil))
-       (setf (symbol-function 'nntp-report) nntp-report-n))
-     nntp-with-open-group-internal))
+  `(nntp-with-open-group-function ,group ,server ,connectionless (lambda () ,@forms)))
 
 (deffoo nntp-retrieve-headers (articles &optional group server fetch-old)
   "Retrieve the headers of ARTICLES."
   (nntp-with-open-group
    group server
-   (save-excursion
-     (set-buffer (nntp-find-connection-buffer nntp-server-buffer))
+   (with-current-buffer (nntp-find-connection-buffer nntp-server-buffer)
      (erase-buffer)
      (if (and (not gnus-nov-is-evil)
               (not nntp-nov-is-evil)
@@ -930,8 +940,7 @@
 
 (defun nntp-try-list-active (group)
   (nntp-list-active-group group)
-  (save-excursion
-    (set-buffer nntp-server-buffer)
+  (with-current-buffer nntp-server-buffer
     (goto-char (point-min))
     (cond ((or (eobp)
 	       (looking-at "5[0-9]+"))
@@ -959,8 +968,7 @@
            (if (numberp article) (int-to-string article) article))
       (if (and buffer
                (not (equal buffer nntp-server-buffer)))
-          (save-excursion
-            (set-buffer nntp-server-buffer)
+          (with-current-buffer nntp-server-buffer
             (copy-to-buffer buffer (point-min) (point-max))
             (nntp-find-group-and-number group))
         (nntp-find-group-and-number group)))))
@@ -1057,8 +1065,7 @@
 (deffoo nntp-request-newgroups (date &optional server)
   (nntp-with-open-group
    nil server
-   (save-excursion
-     (set-buffer nntp-server-buffer)
+   (with-current-buffer nntp-server-buffer
      (let* ((time (date-to-time date))
             (ls (- (cadr time) (nth 8 (decode-time time)))))
        (cond ((< ls 0)
@@ -1227,12 +1234,11 @@
 
 (defun nntp-make-process-buffer (buffer)
   "Create a new, fresh buffer usable for nntp process connections."
-  (save-excursion
-    (set-buffer
-     (generate-new-buffer
-      (format " *server %s %s %s*"
-	      nntp-address nntp-port-number
-	      (gnus-buffer-exists-p buffer))))
+  (with-current-buffer
+      (generate-new-buffer
+       (format " *server %s %s %s*"
+               nntp-address nntp-port-number
+               (gnus-buffer-exists-p buffer)))
     (mm-disable-multibyte)
     (set (make-local-variable 'after-change-functions) nil)
     (set (make-local-variable 'nntp-process-wait-for) nil)
@@ -1275,8 +1281,7 @@
 	  (prog1
 	      (caar (push (list process buffer nil) nntp-connection-alist))
 	    (push process nntp-connection-list)
-	    (save-excursion
-	      (set-buffer pbuffer)
+	    (with-current-buffer pbuffer
 	      (nntp-read-server-type)
 	      (erase-buffer)
 	      (set-buffer nntp-server-buffer)
@@ -1304,8 +1309,7 @@
 					    ?s nntp-address
 					    ?p nntp-port-number)))))
     (gnus-set-process-query-on-exit-flag proc nil)
-    (save-excursion
-      (set-buffer buffer)
+    (with-current-buffer buffer
       (let ((nntp-connection-alist (list proc buffer nil)))
 	(nntp-wait-for-string "^\r*20[01]"))
       (beginning-of-line)
@@ -1315,8 +1319,7 @@
 (defun nntp-open-tls-stream (buffer)
   (let ((proc (open-tls-stream "nntpd" buffer nntp-address nntp-port-number)))
     (gnus-set-process-query-on-exit-flag proc nil)
-    (save-excursion
-      (set-buffer buffer)
+    (with-current-buffer buffer
       (let ((nntp-connection-alist (list proc buffer nil)))
 	(nntp-wait-for-string "^\r*20[01]"))
       (beginning-of-line)
@@ -1337,8 +1340,7 @@
 	  (funcall (cadr entry)))))))
 
 (defun nntp-async-wait (process wait-for buffer decode callback)
-  (save-excursion
-    (set-buffer (process-buffer process))
+  (with-current-buffer (process-buffer process)
     (unless nntp-inside-change-function
       (erase-buffer))
     (setq nntp-process-wait-for wait-for
@@ -1386,8 +1388,7 @@
       (setq after-change-functions '(nntp-after-change-function)))))
 
 (defun nntp-async-trigger (process)
-  (save-excursion
-    (set-buffer (process-buffer process))
+  (with-current-buffer (process-buffer process)
     (when nntp-process-callback
       ;; do we have an error message?
       (goto-char nntp-process-start-point)
@@ -1412,8 +1413,7 @@
 	    (let ((buf (current-buffer))
 		  (start nntp-process-start-point)
 		  (decode nntp-process-decode))
-	      (save-excursion
-		(set-buffer nntp-process-to-buffer)
+	      (with-current-buffer nntp-process-to-buffer
 		(goto-char (point-max))
 		(save-restriction
 		  (narrow-to-region (point) (point))
@@ -1477,8 +1477,7 @@
       (cond ((not entry)
              (nntp-report "Server closed connection"))
             ((not (equal group (caddr entry)))
-             (save-excursion
-               (set-buffer (process-buffer (car entry)))
+             (with-current-buffer (process-buffer (car entry))
                (erase-buffer)
                (nntp-send-command "^[245].*\n" "GROUP" group)
                (setcar (cddr entry) group)
@@ -1678,8 +1677,7 @@
 	;; We try them all until we get at positive response.
 	(while (and commands (eq nntp-server-xover 'try))
 	  (nntp-send-command-nodelete "\r?\n\\.\r?\n" (car commands) range)
-	  (save-excursion
-	    (set-buffer nntp-server-buffer)
+	  (with-current-buffer nntp-server-buffer
 	    (goto-char (point-min))
 	    (and (looking-at "[23]")	; No error message.
 		 ;; We also have to look at the lines.  Some buggy
@@ -1700,6 +1698,7 @@
 (defun nntp-find-group-and-number (&optional group)
   (save-excursion
     (save-restriction
+      ;; FIXME: This is REALLY FISHY: set-buffer after save-restriction?!?
       (set-buffer nntp-server-buffer)
       (narrow-to-region (goto-char (point-min))
 			(or (search-forward "\n\n" nil t) (point-max)))
@@ -1804,9 +1803,21 @@
 (defvoo nntp-telnet-passwd nil
   "Password to use to log in via telnet with.")
 
+(defun nntp-service-to-port (svc)
+  (cond
+   ((integerp svc) (number-to-string svc))
+   ((string-match "\\`[[:digit:]]\\'" svc) svc)
+   (t
+    (with-temp-buffer
+      (ignore-errors (insert-file-contents "/etc/services"))
+      (goto-char (point-min))
+      (if (re-search-forward (concat "^" (regexp-quote svc)
+                                     "[ \t]+\\([[:digit:]]+\\)/tcp"))
+          (match-string 1)
+        svc)))))
+
 (defun nntp-open-telnet (buffer)
-  (save-excursion
-    (set-buffer buffer)
+  (with-current-buffer buffer
     (erase-buffer)
     (let ((proc (apply
 		 'start-process
@@ -1862,8 +1873,7 @@
 		(apply 'start-process
 		       "nntpd" buffer nntp-rlogin-program nntp-address
 		       nntp-rlogin-parameters))))
-    (save-excursion
-      (set-buffer buffer)
+    (with-current-buffer buffer
       (nntp-wait-for-string "^\r*20[01]")
       (beginning-of-line)
       (delete-region (point-min) (point))
@@ -1876,6 +1886,8 @@
 
 (defun nntp-open-telnet-stream (buffer)
   "Open a nntp connection by telnet'ing the news server.
+`nntp-open-netcat-stream' is recommended in place of this function
+because it is more reliable.
 
 Please refer to the following variables to customize the connection:
 - `nntp-pre-command',
@@ -1887,15 +1899,12 @@
   (let ((command `(,nntp-telnet-command
 		   ,@nntp-telnet-switches
 		   ,nntp-address
-		   ,(if (integerp nntp-port-number)
-			(number-to-string nntp-port-number)
-		      nntp-port-number)))
+		   ,(nntp-service-to-port nntp-port-number)))
 	proc)
     (and nntp-pre-command
 	 (push nntp-pre-command command))
     (setq proc (apply 'start-process "nntpd" buffer command))
-    (save-excursion
-      (set-buffer buffer)
+    (with-current-buffer buffer
       (nntp-wait-for-string "^\r*20[01]")
       (beginning-of-line)
       (delete-region (point-min) (point))
@@ -1905,6 +1914,8 @@
   "Open a connection to an nntp server through an intermediate host.
 First rlogin to the remote host, and then telnet the real news server
 from there.
+`nntp-open-via-rlogin-and-netcat' is recommended in place of this function
+because it is more reliable.
 
 Please refer to the following variables to customize the connection:
 - `nntp-pre-command',
@@ -1929,13 +1940,10 @@
     (and nntp-pre-command
 	 (push nntp-pre-command command))
     (setq proc (apply 'start-process "nntpd" buffer command))
-    (save-excursion
-      (set-buffer buffer)
+    (with-current-buffer buffer
       (nntp-wait-for-string "^r?telnet")
       (process-send-string proc (concat "open " nntp-address " "
-					(if (integerp nntp-port-number)
-					    (number-to-string nntp-port-number)
-					  nntp-port-number)
+					(nntp-service-to-port nntp-port-number)
 					"\n"))
       (nntp-wait-for-string "^\r*20[01]")
       (beginning-of-line)
@@ -1961,26 +1969,46 @@
 - `nntp-via-rlogin-command-switches',
 - `nntp-via-user-name',
 - `nntp-via-address',
-- `nntp-via-netcat-command',
-- `nntp-via-netcat-switches',
+- `nntp-netcat-command',
+- `nntp-netcat-switches',
 - `nntp-address',
-- `nntp-port-number',
-- `nntp-end-of-line'."
+- `nntp-port-number'."
   (let ((command `(,@(when nntp-pre-command
 		       (list nntp-pre-command))
 		   ,nntp-via-rlogin-command
-		   ,@(when nntp-via-rlogin-command-switches
-		       nntp-via-rlogin-command-switches)
+		   ,@nntp-via-rlogin-command-switches
 		   ,@(when nntp-via-user-name
 		       (list "-l" nntp-via-user-name))
 		   ,nntp-via-address
-		   ,nntp-via-netcat-command
-		   ,@nntp-via-netcat-switches
+		   ,nntp-netcat-command
+		   ,@nntp-netcat-switches
 		   ,nntp-address
-		   ,(if (integerp nntp-port-number)
-			(number-to-string nntp-port-number)
-		      nntp-port-number))))
-    (apply 'start-process "nntpd" buffer command)))
+		   ,(nntp-service-to-port nntp-port-number))))
+    ;; A non-nil connection type results in mightily odd behavior where
+    ;; (process-send-string proc "\^M") ends up sending a "\n" to the
+    ;; ssh process.  --Stef
+    ;; Also a nil connection allow ssh-askpass to work under X11.
+    (let ((process-connection-type nil))
+      (apply 'start-process "nntpd" buffer command))))
+
+(defun nntp-open-netcat-stream (buffer)
+  "Open a connection to an nntp server through netcat.
+I.e. use the `nc' command rather than Emacs's builtin networking code.
+
+Please refer to the following variables to customize the connection:
+- `nntp-pre-command',
+- `nntp-netcat-command',
+- `nntp-netcat-switches',
+- `nntp-address',
+- `nntp-port-number'."
+  (let ((command `(,nntp-netcat-command
+		   ,@nntp-netcat-switches
+                   ,nntp-address
+                   ,(nntp-service-to-port nntp-port-number))))
+    (and nntp-pre-command (push nntp-pre-command command))
+    (let ((process-connection-type nil)) ;See `nntp-open-via-rlogin-and-netcat'.
+      (apply 'start-process "nntpd" buffer command))))
+ 
 
 (defun nntp-open-via-telnet-and-telnet (buffer)
   "Open a connection to an nntp server through an intermediate host.
@@ -2001,8 +2029,7 @@
 - `nntp-address',
 - `nntp-port-number',
 - `nntp-end-of-line'."
-  (save-excursion
-    (set-buffer buffer)
+  (with-current-buffer buffer
     (erase-buffer)
     (let ((command `(,nntp-via-telnet-command ,@nntp-via-telnet-switches))
 	  (case-fold-search t)
@@ -2039,9 +2066,7 @@
 				     ,nntp-telnet-command
 				     ,@nntp-telnet-switches
 				     ,nntp-address
-				     ,(if (integerp nntp-port-number)
-					  (number-to-string nntp-port-number)
-					nntp-port-number))))
+				     ,(nntp-service-to-port nntp-port-number))))
 	  (process-send-string proc
 			       (concat (mapconcat 'identity
 						  real-telnet-command " ")
@@ -2151,5 +2176,5 @@
 
 (provide 'nntp)
 
-;;; arch-tag: 8655466a-b1b5-4929-9c45-7b1b2e767271
+;; arch-tag: 8655466a-b1b5-4929-9c45-7b1b2e767271
 ;;; nntp.el ends here
Index: gnus/lisp/nnultimate.el
diff -u gnus/lisp/nnultimate.el:7.9 gnus/lisp/nnultimate.el:7.10
--- gnus/lisp/nnultimate.el:7.9	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/nnultimate.el	Thu Apr 24 06:19:20 2008
@@ -478,5 +478,5 @@
 ;; coding: iso-8859-1
 ;; End:
 
-;;; arch-tag: ab6bfc45-8fe1-4647-9c78-41050eb152b8
+;; arch-tag: ab6bfc45-8fe1-4647-9c78-41050eb152b8
 ;;; nnultimate.el ends here
Index: gnus/lisp/nnvirtual.el
diff -u gnus/lisp/nnvirtual.el:7.12 gnus/lisp/nnvirtual.el:7.13
--- gnus/lisp/nnvirtual.el:7.12	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/nnvirtual.el	Thu Apr 24 06:19:21 2008
@@ -812,5 +812,5 @@
 
 (provide 'nnvirtual)
 
-;;; arch-tag: ca8c8ad9-1bd8-4b0f-9722-90dc645a45f5
+;; arch-tag: ca8c8ad9-1bd8-4b0f-9722-90dc645a45f5
 ;;; nnvirtual.el ends here
Index: gnus/lisp/nnwarchive.el
diff -u gnus/lisp/nnwarchive.el:7.9 gnus/lisp/nnwarchive.el:7.10
--- gnus/lisp/nnwarchive.el:7.9	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/nnwarchive.el	Thu Apr 24 06:19:21 2008
@@ -725,5 +725,5 @@
 
 (provide 'nnwarchive)
 
-;;; arch-tag: 1ab7a15c-777a-40e0-95c0-0c41b3963578
+;; arch-tag: 1ab7a15c-777a-40e0-95c0-0c41b3963578
 ;;; nnwarchive.el ends here
Index: gnus/lisp/nnweb.el
diff -u gnus/lisp/nnweb.el:7.37 gnus/lisp/nnweb.el:7.38
--- gnus/lisp/nnweb.el:7.37	Sat Mar  1 02:31:08 2008
+++ gnus/lisp/nnweb.el	Thu Apr 24 06:19:21 2008
@@ -294,12 +294,12 @@
   "Initialize buffers and such."
   (unless (gnus-buffer-live-p nnweb-buffer)
     (setq nnweb-buffer
-	  (save-excursion
-	    (mm-with-unibyte
-	      (nnheader-set-temp-buffer
-	       (format " *nnweb %s %s %s*"
-		       nnweb-type nnweb-search server))
-	      (current-buffer))))))
+	  (save-current-buffer
+            (nnheader-set-temp-buffer
+             (format " *nnweb %s %s %s*"
+                     nnweb-type nnweb-search server))
+            (mm-disable-multibyte)
+            (current-buffer)))))
 
 ;;;
 ;;; groups.google.com
@@ -544,7 +544,11 @@
 (defun nnweb-insert-html (parse)
   "Insert HTML based on a w3 parse tree."
   (if (stringp parse)
-      (insert (nnheader-string-as-multibyte parse))
+      ;; We used to call nnheader-string-as-multibyte here, but it cannot
+      ;; be right, so I removed it.  If a bug shows up because of this change,
+      ;; please do not blindly revert the change, but help me find the real
+      ;; cause of the bug instead.  --Stef
+      (insert parse)
     (insert "<" (symbol-name (car parse)) " ")
     (insert (mapconcat
 	     (lambda (param)
@@ -610,5 +614,5 @@
 
 (provide 'nnweb)
 
-;;; arch-tag: f59307eb-c90f-479f-b7d2-dbd8bf51b697
+;; arch-tag: f59307eb-c90f-479f-b7d2-dbd8bf51b697
 ;;; nnweb.el ends here
Index: gnus/lisp/nnwfm.el
diff -u gnus/lisp/nnwfm.el:7.8 gnus/lisp/nnwfm.el:7.9
--- gnus/lisp/nnwfm.el:7.8	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/nnwfm.el	Thu Apr 24 06:19:20 2008
@@ -430,5 +430,5 @@
 ;; coding: iso-8859-1
 ;; End:
 
-;;; arch-tag: d813966a-4211-4557-ad11-d1ac2bc86536
+;; arch-tag: d813966a-4211-4557-ad11-d1ac2bc86536
 ;;; nnwfm.el ends here
Index: gnus/lisp/ntlm.el
diff -u gnus/lisp/ntlm.el:7.8 gnus/lisp/ntlm.el:7.9
--- gnus/lisp/ntlm.el:7.8	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/ntlm.el	Thu Apr 24 06:19:20 2008
@@ -536,5 +536,5 @@
 
 (provide 'ntlm)
 
-;;; arch-tag: 348ace18-f8e2-4176-8fe9-d9ab4e96f296
+;; arch-tag: 348ace18-f8e2-4176-8fe9-d9ab4e96f296
 ;;; ntlm.el ends here
Index: gnus/lisp/parse-time.el
diff -u gnus/lisp/parse-time.el:7.10 gnus/lisp/parse-time.el:7.11
--- gnus/lisp/parse-time.el:7.10	Mon Mar 10 01:53:11 2008
+++ gnus/lisp/parse-time.el	Thu Apr 24 06:19:20 2008
@@ -1,7 +1,7 @@
 ;;; parse-time.el --- parsing time strings
 
-;; Copyright (C) 1996, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
-;;   Free Software Foundation, Inc.
+;; Copyright (C) 1996, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+;;   2008  Free Software Foundation, Inc.
 
 ;; Author: Erik Naggum <[email protected]>
 ;; Keywords: util
@@ -187,7 +187,7 @@
       (let ((parse-time-elt (pop temp))
 	    (rules parse-time-rules)
 	    (exit nil))
-	(while (and (not (null rules)) (not exit))
+	(while (and rules (not exit))
 	  (let* ((rule (pop rules))
 		 (slots (pop rule))
 		 (predicate (pop rule))
@@ -219,5 +219,5 @@
 
 (provide 'parse-time)
 
-;;; arch-tag: 07066094-45a8-4c68-b307-86195e2c1103
+;; arch-tag: 07066094-45a8-4c68-b307-86195e2c1103
 ;;; parse-time.el ends here
Index: gnus/lisp/password-cache.el
diff -u gnus/lisp/password-cache.el:7.2 gnus/lisp/password-cache.el:7.3
--- gnus/lisp/password-cache.el:7.2	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/password-cache.el	Thu Apr 24 06:19:21 2008
@@ -132,5 +132,5 @@
 
 (provide 'password-cache)
 
-;;; arch-tag: ab160494-16c8-4c68-a4a1-73eebf6686e5
+;; arch-tag: ab160494-16c8-4c68-a4a1-73eebf6686e5
 ;;; password-cache.el ends here
Index: gnus/lisp/pgg-def.el
diff -u gnus/lisp/pgg-def.el:7.15 gnus/lisp/pgg-def.el:7.16
--- gnus/lisp/pgg-def.el:7.15	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/pgg-def.el	Thu Apr 24 06:19:21 2008
@@ -96,5 +96,5 @@
 
 (provide 'pgg-def)
 
-;;; arch-tag: c425f3ab-ed75-4055-bb46-431a418c94b7
+;; arch-tag: c425f3ab-ed75-4055-bb46-431a418c94b7
 ;;; pgg-def.el ends here
Index: gnus/lisp/pgg-gpg.el
diff -u gnus/lisp/pgg-gpg.el:7.30 gnus/lisp/pgg-gpg.el:7.31
--- gnus/lisp/pgg-gpg.el:7.30	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/pgg-gpg.el	Thu Apr 24 06:19:20 2008
@@ -405,5 +405,5 @@
 
 (provide 'pgg-gpg)
 
-;;; arch-tag: 2aa5d5d8-93a0-4865-9312-33e29830e000
+;; arch-tag: 2aa5d5d8-93a0-4865-9312-33e29830e000
 ;;; pgg-gpg.el ends here
Index: gnus/lisp/pgg-parse.el
diff -u gnus/lisp/pgg-parse.el:7.14 gnus/lisp/pgg-parse.el:7.15
--- gnus/lisp/pgg-parse.el:7.14	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/pgg-parse.el	Thu Apr 24 06:19:21 2008
@@ -520,5 +520,5 @@
 
 (provide 'pgg-parse)
 
-;;; arch-tag: 16c2eb82-1313-4a7c-a70f-420709b5b43e
+;; arch-tag: 16c2eb82-1313-4a7c-a70f-420709b5b43e
 ;;; pgg-parse.el ends here
Index: gnus/lisp/pgg-pgp5.el
diff -u gnus/lisp/pgg-pgp5.el:7.13 gnus/lisp/pgg-pgp5.el:7.14
--- gnus/lisp/pgg-pgp5.el:7.13	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/pgg-pgp5.el	Thu Apr 24 06:19:20 2008
@@ -256,5 +256,5 @@
 
 (provide 'pgg-pgp5)
 
-;;; arch-tag: 3dbd1073-6b3a-466c-9f55-5c587ffa6d7b
+;; arch-tag: 3dbd1073-6b3a-466c-9f55-5c587ffa6d7b
 ;;; pgg-pgp5.el ends here
Index: gnus/lisp/pgg.el
diff -u gnus/lisp/pgg.el:7.20 gnus/lisp/pgg.el:7.21
--- gnus/lisp/pgg.el:7.20	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/pgg.el	Thu Apr 24 06:19:20 2008
@@ -599,5 +599,5 @@
 
 (provide 'pgg)
 
-;;; arch-tag: 9cc705dd-1e6a-4c90-8dce-c3561f9a2cf4
+;; arch-tag: 9cc705dd-1e6a-4c90-8dce-c3561f9a2cf4
 ;;; pgg.el ends here
Index: gnus/lisp/pop3.el
diff -u gnus/lisp/pop3.el:7.32 gnus/lisp/pop3.el:7.33
--- gnus/lisp/pop3.el:7.32	Sat Mar  1 02:48:13 2008
+++ gnus/lisp/pop3.el	Thu Apr 24 06:19:21 2008
@@ -613,5 +613,5 @@
 
 (provide 'pop3)
 
-;;; arch-tag: 2facc142-1d74-498e-82af-4659b64cac12
+;; arch-tag: 2facc142-1d74-498e-82af-4659b64cac12
 ;;; pop3.el ends here
Index: gnus/lisp/qp.el
diff -u gnus/lisp/qp.el:7.14 gnus/lisp/qp.el:7.15
--- gnus/lisp/qp.el:7.14	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/qp.el	Thu Apr 24 06:19:20 2008
@@ -164,5 +164,5 @@
 
 (provide 'qp)
 
-;;; arch-tag: db89e52a-e4a1-4b69-926f-f434f04216ba
+;; arch-tag: db89e52a-e4a1-4b69-926f-f434f04216ba
 ;;; qp.el ends here
Index: gnus/lisp/rfc1843.el
diff -u gnus/lisp/rfc1843.el:7.11 gnus/lisp/rfc1843.el:7.12
--- gnus/lisp/rfc1843.el:7.11	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/rfc1843.el	Thu Apr 24 06:19:21 2008
@@ -194,5 +194,5 @@
 
 (provide 'rfc1843)
 
-;;; arch-tag: 5149c301-a6ca-4731-9c9d-ba616e2cb687
+;; arch-tag: 5149c301-a6ca-4731-9c9d-ba616e2cb687
 ;;; rfc1843.el ends here
Index: gnus/lisp/rfc2045.el
diff -u gnus/lisp/rfc2045.el:7.9 gnus/lisp/rfc2045.el:7.10
--- gnus/lisp/rfc2045.el:7.9	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/rfc2045.el	Thu Apr 24 06:19:21 2008
@@ -41,5 +41,5 @@
 
 (provide 'rfc2045)
 
-;;; arch-tag: 9ca54127-97bc-432c-b6e2-8c59cadba306
+;; arch-tag: 9ca54127-97bc-432c-b6e2-8c59cadba306
 ;;; rfc2045.el ends here
Index: gnus/lisp/rfc2047.el
diff -u gnus/lisp/rfc2047.el:7.69 gnus/lisp/rfc2047.el:7.70
--- gnus/lisp/rfc2047.el:7.69	Sun Feb 24 07:23:40 2008
+++ gnus/lisp/rfc2047.el	Thu Apr 24 06:19:20 2008
@@ -1094,17 +1094,17 @@
   "Decode MIME-encoded STRING and return the result.
 If ADDRESS-MIME is non-nil, strip backslashes which precede characters
 other than `\"' and `\\' in quoted strings."
-  (let ((m (mm-multibyte-p)))
+  ;; (let ((m (mm-multibyte-p)))
     (if (string-match "=\\?" string)
 	(with-temp-buffer
-	  ;; Fixme: This logic is wrong, but seems to be required by
-	  ;; Gnus summary buffer generation.  The value of `m' depends
-	  ;; on the current buffer, not global multibyteness or that
-	  ;; of the string.  Also the string returned should always be
-	  ;; multibyte in a multibyte session, i.e. the buffer should
-	  ;; be multibyte before `buffer-string' is called.
-	  (when m
-	    (mm-enable-multibyte))
+          ;; We used to only call mm-enable-multibyte if `m' is non-nil,
+          ;; but this can't be the right criterion.  Don't just revert this
+          ;; change if it encounters a bug.  Please help me fix it
+          ;; right instead.  --Stef
+          ;; The string returned should always be multibyte in a multibyte
+	  ;; session, i.e. the buffer should be multibyte before
+	  ;; `buffer-string' is called.
+          (mm-enable-multibyte)
 	  (insert string)
 	  (inline
 	    (rfc2047-decode-region (point-min) (point-max) address-mime))
@@ -1118,7 +1118,7 @@
 		(rfc2047-strip-backslashes-in-quoted-strings)
 		(buffer-string))))
       ;; Fixme: As above, `m' here is inappropriate.
-      (if (and m
+      (if (and ;; m
 	       mail-parse-charset
 	       (not (eq mail-parse-charset 'us-ascii))
 	       (not (eq mail-parse-charset 'gnus-decoded)))
@@ -1134,9 +1134,9 @@
 	  (if (and (fboundp 'detect-coding-string)
 		   ;; string is purely ASCII
 		   (eq (detect-coding-string string t) 'undecided))
-	      string
-	    (mm-decode-coding-string string mail-parse-charset))
-	(mm-string-as-multibyte string)))))
+              string
+            (mm-decode-coding-string string mail-parse-charset))
+        (mm-string-to-multibyte string)))) ;; )
 
 (defun rfc2047-decode-address-string (string)
   "Decode MIME-encoded STRING and return the result.
@@ -1161,5 +1161,5 @@
 
 (provide 'rfc2047)
 
-;;; arch-tag: a07fe3d4-22b5-4c4a-bd89-b1f82d5d36f6
+;; arch-tag: a07fe3d4-22b5-4c4a-bd89-b1f82d5d36f6
 ;;; rfc2047.el ends here
Index: gnus/lisp/rfc2104.el
diff -u gnus/lisp/rfc2104.el:7.10 gnus/lisp/rfc2104.el:7.11
--- gnus/lisp/rfc2104.el:7.10	Sun Feb 24 07:23:40 2008
+++ gnus/lisp/rfc2104.el	Thu Apr 24 06:19:21 2008
@@ -120,5 +120,5 @@
 
 (provide 'rfc2104)
 
-;;; arch-tag: cf671d5c-a45f-4a09-815e-704e59e43950
+;; arch-tag: cf671d5c-a45f-4a09-815e-704e59e43950
 ;;; rfc2104.el ends here
Index: gnus/lisp/rfc2231.el
diff -u gnus/lisp/rfc2231.el:7.24 gnus/lisp/rfc2231.el:7.25
--- gnus/lisp/rfc2231.el:7.24	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/rfc2231.el	Thu Apr 24 06:19:20 2008
@@ -298,5 +298,5 @@
 
 (provide 'rfc2231)
 
-;;; arch-tag: c3ab751d-d108-406a-b301-68882ad8cd63
+;; arch-tag: c3ab751d-d108-406a-b301-68882ad8cd63
 ;;; rfc2231.el ends here
Index: gnus/lisp/sasl-cram.el
diff -u gnus/lisp/sasl-cram.el:7.6 gnus/lisp/sasl-cram.el:7.7
--- gnus/lisp/sasl-cram.el:7.6	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/sasl-cram.el	Thu Apr 24 06:19:20 2008
@@ -48,5 +48,5 @@
 
 (provide 'sasl-cram)
 
-;;; arch-tag: 46cb281b-975a-4fe0-a39f-3018691b1b05
+;; arch-tag: 46cb281b-975a-4fe0-a39f-3018691b1b05
 ;;; sasl-cram.el ends here
Index: gnus/lisp/sasl-digest.el
diff -u gnus/lisp/sasl-digest.el:7.6 gnus/lisp/sasl-digest.el:7.7
--- gnus/lisp/sasl-digest.el:7.6	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/sasl-digest.el	Thu Apr 24 06:19:21 2008
@@ -155,5 +155,5 @@
 
 (provide 'sasl-digest)
 
-;;; arch-tag: 786e02ed-1bc4-4b3c-bf34-96c27e31084d
+;; arch-tag: 786e02ed-1bc4-4b3c-bf34-96c27e31084d
 ;;; sasl-digest.el ends here
Index: gnus/lisp/sasl-ntlm.el
diff -u gnus/lisp/sasl-ntlm.el:7.6 gnus/lisp/sasl-ntlm.el:7.7
--- gnus/lisp/sasl-ntlm.el:7.6	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/sasl-ntlm.el	Thu Apr 24 06:19:20 2008
@@ -64,5 +64,5 @@
 
 (provide 'sasl-ntlm)
 
-;;; arch-tag: 1d9164c1-1df0-418f-b7ab-360157fd05dc
+;; arch-tag: 1d9164c1-1df0-418f-b7ab-360157fd05dc
 ;;; sasl-ntlm.el ends here
Index: gnus/lisp/sasl.el
diff -u gnus/lisp/sasl.el:7.6 gnus/lisp/sasl.el:7.7
--- gnus/lisp/sasl.el:7.6	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/sasl.el	Thu Apr 24 06:19:20 2008
@@ -269,5 +269,5 @@
 
 (provide 'sasl)
 
-;;; arch-tag: 8b3326fa-4978-4fda-93e2-cb2c6255f887
+;; arch-tag: 8b3326fa-4978-4fda-93e2-cb2c6255f887
 ;;; sasl.el ends here
Index: gnus/lisp/score-mode.el
diff -u gnus/lisp/score-mode.el:7.12 gnus/lisp/score-mode.el:7.13
--- gnus/lisp/score-mode.el:7.12	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/score-mode.el	Thu Apr 24 06:19:20 2008
@@ -118,5 +118,5 @@
 
 (provide 'score-mode)
 
-;;; arch-tag: a74a416b-2505-4ad4-bc4e-a418c96b8845
+;; arch-tag: a74a416b-2505-4ad4-bc4e-a418c96b8845
 ;;; score-mode.el ends here
Index: gnus/lisp/sha1.el
diff -u gnus/lisp/sha1.el:7.12 gnus/lisp/sha1.el:7.13
--- gnus/lisp/sha1.el:7.12	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/sha1.el	Thu Apr 24 06:19:21 2008
@@ -88,16 +88,17 @@
   :group 'sha1)
 
 (defun sha1-string-external (string &optional binary)
-  (let (prog args digest default-enable-multibyte-characters)
+  (let (prog args digest)
     (if (consp sha1-program)
 	(setq prog (car sha1-program)
 	      args (cdr sha1-program))
       (setq prog sha1-program
 	    args nil))
     (with-temp-buffer
+      (set-buffer-multibyte nil)
       (insert string)
       (apply (function call-process-region)
-	     (point-min)(point-max)
+	     (point-min) (point-max)
 	     prog t t nil args)
       ;; SHA1 is 40 bytes long in hexadecimal form.
       (setq digest (buffer-substring (point-min)(+ (point-min) 40))))
Index: gnus/lisp/sieve-manage.el
diff -u gnus/lisp/sieve-manage.el:7.19 gnus/lisp/sieve-manage.el:7.20
--- gnus/lisp/sieve-manage.el:7.19	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/sieve-manage.el	Thu Apr 24 06:19:20 2008
@@ -706,5 +706,5 @@
 
 (provide 'sieve-manage)
 
-;;; arch-tag: 321c4640-1371-4495-9baf-8ccb71dd5bd1
+;; arch-tag: 321c4640-1371-4495-9baf-8ccb71dd5bd1
 ;; sieve-manage.el ends here
Index: gnus/lisp/sieve-mode.el
diff -u gnus/lisp/sieve-mode.el:7.11 gnus/lisp/sieve-mode.el:7.12
--- gnus/lisp/sieve-mode.el:7.11	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/sieve-mode.el	Thu Apr 24 06:19:20 2008
@@ -214,5 +214,5 @@
 
 (provide 'sieve-mode)
 
-;;; arch-tag: 3b8ab76d-065d-4c52-b1e8-ab2ec21f2ace
+;; arch-tag: 3b8ab76d-065d-4c52-b1e8-ab2ec21f2ace
 ;; sieve-mode.el ends here
Index: gnus/lisp/sieve.el
diff -u gnus/lisp/sieve.el:7.14 gnus/lisp/sieve.el:7.15
--- gnus/lisp/sieve.el:7.14	Mon Jan 28 10:02:57 2008
+++ gnus/lisp/sieve.el	Thu Apr 24 06:19:21 2008
@@ -382,5 +382,5 @@
 
 (provide 'sieve)
 
-;;; arch-tag: 7f6a6d94-94e1-4654-ab9a-aee21b9b8a94
+;; arch-tag: 7f6a6d94-94e1-4654-ab9a-aee21b9b8a94
 ;; sieve.el ends here
Index: gnus/lisp/smiley.el
diff -u gnus/lisp/smiley.el:7.22 gnus/lisp/smiley.el:7.23
--- gnus/lisp/smiley.el:7.22	Sat Mar  1 02:48:13 2008
+++ gnus/lisp/smiley.el	Thu Apr 24 06:19:21 2008
@@ -228,5 +228,5 @@
 
 (provide 'smiley)
 
-;;; arch-tag: 5beb161b-4321-40af-8ac9-876afb8ee818
+;; arch-tag: 5beb161b-4321-40af-8ac9-876afb8ee818
 ;;; smiley.el ends here
Index: gnus/lisp/smime.el
diff -u gnus/lisp/smime.el:7.32 gnus/lisp/smime.el:7.33
--- gnus/lisp/smime.el:7.32	Sat Mar  1 02:48:13 2008
+++ gnus/lisp/smime.el	Thu Apr 24 06:19:21 2008
@@ -731,5 +731,5 @@
 
 (provide 'smime)
 
-;;; arch-tag: e3f9b938-5085-4510-8a11-6625269c9a9e
+;; arch-tag: e3f9b938-5085-4510-8a11-6625269c9a9e
 ;;; smime.el ends here
Index: gnus/lisp/spam-report.el
diff -u gnus/lisp/spam-report.el:7.36 gnus/lisp/spam-report.el:7.37
--- gnus/lisp/spam-report.el:7.36	Sat Mar  1 02:48:13 2008
+++ gnus/lisp/spam-report.el	Thu Apr 24 06:19:20 2008
@@ -361,5 +361,5 @@
 
 (provide 'spam-report)
 
-;;; arch-tag: f6683295-ec89-4ab5-8803-8cc842293022
+;; arch-tag: f6683295-ec89-4ab5-8803-8cc842293022
 ;;; spam-report.el ends here.
Index: gnus/lisp/spam-stat.el
diff -u gnus/lisp/spam-stat.el:7.30 gnus/lisp/spam-stat.el:7.31
--- gnus/lisp/spam-stat.el:7.30	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/spam-stat.el	Thu Apr 24 06:19:21 2008
@@ -673,5 +673,5 @@
 
 (provide 'spam-stat)
 
-;;; arch-tag: ff1d2200-8ddb-42fb-bb7b-1b5e20448554
+;; arch-tag: ff1d2200-8ddb-42fb-bb7b-1b5e20448554
 ;;; spam-stat.el ends here
Index: gnus/lisp/spam-wash.el
diff -u gnus/lisp/spam-wash.el:1.6 gnus/lisp/spam-wash.el:1.7
--- gnus/lisp/spam-wash.el:1.6	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/spam-wash.el	Thu Apr 24 06:19:20 2008
@@ -71,5 +71,5 @@
 
 (provide 'spam-wash)
 
-;;; arch-tag: 3c7f94a7-c96d-4c77-bb59-950df12bc85f
+;; arch-tag: 3c7f94a7-c96d-4c77-bb59-950df12bc85f
 ;;; spam-wash.el ends here
Index: gnus/lisp/spam.el
diff -u gnus/lisp/spam.el:7.98 gnus/lisp/spam.el:7.99
--- gnus/lisp/spam.el:7.98	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/spam.el	Thu Apr 24 06:19:21 2008
@@ -2946,5 +2946,5 @@
 
 (provide 'spam)
 
-;;; arch-tag: 07e6e0ca-ab0a-4412-b445-1f6c72a4f27f
+;; arch-tag: 07e6e0ca-ab0a-4412-b445-1f6c72a4f27f
 ;;; spam.el ends here
Index: gnus/lisp/starttls.el
diff -u gnus/lisp/starttls.el:7.17 gnus/lisp/starttls.el:7.18
--- gnus/lisp/starttls.el:7.17	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/starttls.el	Thu Apr 24 06:19:21 2008
@@ -299,5 +299,5 @@
 
 (provide 'starttls)
 
-;;; arch-tag: 648b3bd8-63bd-47f5-904c-7c819aea2297
+;; arch-tag: 648b3bd8-63bd-47f5-904c-7c819aea2297
 ;;; starttls.el ends here
Index: gnus/lisp/time-date.el
diff -u gnus/lisp/time-date.el:7.14 gnus/lisp/time-date.el:7.15
--- gnus/lisp/time-date.el:7.14	Mon Mar 10 01:53:11 2008
+++ gnus/lisp/time-date.el	Thu Apr 24 06:19:20 2008
@@ -97,7 +97,7 @@
 
 ;;;###autoload
 (defun date-to-time (date)
-  "Parse a string that represents a date-time and return a time value."
+  "Parse a string DATE that represents a date-time and return a time value."
   (condition-case ()
       (apply 'encode-time
 	     (parse-time-string
@@ -160,7 +160,7 @@
 
 ;;;###autoload
 (defun time-subtract (t1 t2)
-  "Subtract two time values.
+  "Subtract two time values, T1 minus T2.
 Return the difference in the format of a time value."
   (with-decoded-time-value ((high low micro type t1)
 			    (high2 low2 micro2 type2 t2))
@@ -178,7 +178,7 @@
 
 ;;;###autoload
 (defun time-add (t1 t2)
-  "Add two time values.  One should represent a time difference."
+  "Add two time values T1 and T2.  One should represent a time difference."
   (with-decoded-time-value ((high low micro type t1)
 			    (high2 low2 micro2 type2 t2))
     (setq high (+ high high2)
@@ -248,7 +248,7 @@
 
 ;;;###autoload
 (defun safe-date-to-time (date)
-  "Parse a string that represents a date-time and return a time value.
+  "Parse a string DATE that represents a date-time and return a time value.
 If DATE is malformed, return a time value of zeros."
   (condition-case ()
       (date-to-time date)
@@ -335,5 +335,5 @@
 
 (provide 'time-date)
 
-;;; arch-tag: addcf07b-b20a-465b-af72-550b8ac5190f
+;; arch-tag: addcf07b-b20a-465b-af72-550b8ac5190f
 ;;; time-date.el ends here
Index: gnus/lisp/tls.el
diff -u gnus/lisp/tls.el:7.24 gnus/lisp/tls.el:7.26
--- gnus/lisp/tls.el:7.24	Wed Mar 19 23:01:28 2008
+++ gnus/lisp/tls.el	Thu Apr 24 06:19:20 2008
@@ -80,7 +80,7 @@
 
 (defcustom tls-program '("gnutls-cli -p %p %h"
 			 "gnutls-cli -p %p %h --protocols ssl3"
-			 "openssl s_client -connect %h:%p -no_ssl2")
+			 "openssl s_client -connect %h:%p -no_ssl2 -ign_eof")
   "List of strings containing commands to start TLS stream to a host.
 Each entry in the list is tried until a connection is successful.
 %h is replaced with server hostname, %p with port to connect to.
@@ -97,23 +97,23 @@
 	  :value
 	  ("gnutls-cli -p %p %h"
 	   "gnutls-cli -p %p %h --protocols ssl3"
-	   "openssl s_client -connect %h:%p -no_ssl2")
+	   "openssl s_client -connect %h:%p -no_ssl2 -ign_eof")
 	  (set :inline t
 	       ;; FIXME: add brief `:tag "..."' descriptions.
 	       ;; (repeat :inline t :tag "Other" (string))
 	       ;; See `tls-checktrust':
 	       (const "gnutls-cli --x509cafile /etc/ssl/certs/ca-certificates.crt -p %p %h")
 	       (const "gnutls-cli --x509cafile /etc/ssl/certs/ca-certificates.crt -p %p %h --protocols ssl3")
-	       (const "openssl s_client -connect %h:%p -CAfile /etc/ssl/certs/ca-certificates.crt -no_ssl2")
+	       (const "openssl s_client -connect %h:%p -CAfile /etc/ssl/certs/ca-certificates.crt -no_ssl2 -ign_eof")
 	       ;; No trust check:
 	       (const "gnutls-cli -p %p %h")
 	       (const "gnutls-cli -p %p %h --protocols ssl3")
-	       (const "openssl s_client -connect %h:%p -no_ssl2"))
+	       (const "openssl s_client -connect %h:%p -no_ssl2 -ign_eof"))
 	  (repeat :inline t :tag "Other" (string)))
     (const :tag "Default list of commands"
 	   ("gnutls-cli -p %p %h"
 	    "gnutls-cli -p %p %h --protocols ssl3"
-	    "openssl s_client -connect %h:%p -no_ssl2"))
+	    "openssl s_client -connect %h:%p -no_ssl2 -ign_eof"))
     (list :tag "List of commands"
 	  (repeat :tag "Command" (string))))
   :version "22.1"
@@ -144,7 +144,7 @@
 \(setq tls-program
       '(\"gnutls-cli --x509cafile /etc/ssl/certs/ca-certificates.crt -p %p %h\"
 	\"gnutls-cli --x509cafile /etc/ssl/certs/ca-certificates.crt -p %p %h --protocols ssl3\"
-	\"openssl s_client -connect %h:%p -CAfile /etc/ssl/certs/ca-certificates.crt -no_ssl2\"))"
+	\"openssl s_client -connect %h:%p -CAfile /etc/ssl/certs/ca-certificates.crt -no_ssl2 -ign_eof\"))"
   :type '(choice (const :tag "Always" t)
 		 (const :tag "Never" nil)
 		 (const :tag "Ask" ask))
@@ -295,5 +295,5 @@
 
 (provide 'tls)
 
-;;; arch-tag: 5596d1c4-facc-4bc4-94a9-9863b928d7ac
+;; arch-tag: 5596d1c4-facc-4bc4-94a9-9863b928d7ac
 ;;; tls.el ends here
Index: gnus/lisp/utf7.el
diff -u gnus/lisp/utf7.el:7.12 gnus/lisp/utf7.el:7.13
--- gnus/lisp/utf7.el:7.12	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/utf7.el	Thu Apr 24 06:19:21 2008
@@ -232,5 +232,5 @@
 
 (provide 'utf7)
 
-;;; arch-tag: 96078b55-85c7-4161-aed2-932c24b282c7
+;; arch-tag: 96078b55-85c7-4161-aed2-932c24b282c7
 ;;; utf7.el ends here
Index: gnus/lisp/uudecode.el
diff -u gnus/lisp/uudecode.el:7.15 gnus/lisp/uudecode.el:7.16
--- gnus/lisp/uudecode.el:7.15	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/uudecode.el	Thu Apr 24 06:19:20 2008
@@ -217,14 +217,14 @@
 			  result))))
 	  (skip-chars-forward non-data-chars end))
 	(if file-name
-	    (let (default-enable-multibyte-characters)
-	      (with-temp-file file-name
-		(insert (apply 'concat (nreverse result)))))
+            (with-temp-file file-name
+              (set-buffer-multibyte nil)
+              (insert (apply 'concat (nreverse result))))
 	  (or (markerp end) (setq end (set-marker (make-marker) end)))
 	  (goto-char start)
 	  (if enable-multibyte-characters
-	      (mapc #'(lambda (x) (insert (uudecode-string-to-multibyte x)))
-		    (nreverse result))
+	      (dolist (x (nreverse result))
+                (insert (uudecode-string-to-multibyte x)))
 	    (insert (apply 'concat (nreverse result))))
 	  (delete-region (point) end))))))
 
@@ -238,5 +238,5 @@
 
 (provide 'uudecode)
 
-;;; arch-tag: e1f09ed5-62b4-4677-9f13-4e81c4fe8ce3
+;; arch-tag: e1f09ed5-62b4-4677-9f13-4e81c4fe8ce3
 ;;; uudecode.el ends here
Index: gnus/lisp/webmail.el
diff -u gnus/lisp/webmail.el:7.10 gnus/lisp/webmail.el:7.11
--- gnus/lisp/webmail.el:7.10	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/webmail.el	Thu Apr 24 06:19:20 2008
@@ -1150,5 +1150,5 @@
 
 (provide 'webmail)
 
-;;; arch-tag: f75a4558-a8f6-46ec-b1c3-7a6434b3dd71
+;; arch-tag: f75a4558-a8f6-46ec-b1c3-7a6434b3dd71
 ;;; webmail.el ends here
Index: gnus/lisp/yenc.el
diff -u gnus/lisp/yenc.el:7.9 gnus/lisp/yenc.el:7.10
--- gnus/lisp/yenc.el:7.9	Sun Jan 20 06:23:57 2008
+++ gnus/lisp/yenc.el	Thu Apr 24 06:19:21 2008
@@ -137,5 +137,5 @@
 
 (provide 'yenc)
 
-;;; arch-tag: 74df17e8-6fa8-4071-9f7d-54d548d79d9a
+;; arch-tag: 74df17e8-6fa8-4071-9f7d-54d548d79d9a
 ;;; yenc.el ends here
Index: gnus/texi/ChangeLog
diff -u gnus/texi/ChangeLog:7.399 gnus/texi/ChangeLog:7.403
--- gnus/texi/ChangeLog:7.399	Thu Apr 10 20:55:45 2008
+++ gnus/texi/ChangeLog	Thu May  1 17:28:18 2008
@@ -1,11 +1,41 @@
-2008-04-10  Reiner Steib  <[email protected]>
+2008-05-01  Lars Magne Ingebrigtsen  <[email protected]>
 
-	* gnus.texi, gnus-faq.texi, message.texi: No Gnus v0.8 is released.
+	* gnus.texi (Various Summary Stuff): Add gnus-propagate-marks.
+	(Various Summary Stuff): Fix typo in last xref.
+
+2008-04-13  Reiner Steib  <[email protected]>
+
+	* gnus.texi (Oort Gnus): Add message-fill-column.
+
+2008-04-12  Adrian Aichner  <[email protected]>
+
+	* gnus.texi (Mail Source Specifiers): Typo fix.
+
+2008-04-12  Reiner Steib  <[email protected]>
+
+	* gnus.texi (Diary Headers Generation): Update key binding for
+	`gnus-diary-check-message'.
+
+2008-04-11  Reiner Steib  <[email protected]>
+
+	* gnus.texi, gnus-faq.texi, message.texi: Bump version to 0.9.
 
 2008-04-10  Reiner Steib  <[email protected]>
 
 	* gnus.texi (Emacsen): Addition.
 
+2008-04-10  Reiner Steib  <[email protected]>
+
+	* gnus.texi (Emacsen): Give recommendations for Emacs 22 and Emacs 23.
+
+2008-04-10  Reiner Steib  <[email protected]>
+
+	* gnus.texi, gnus-faq.texi, message.texi: No Gnus v0.8 is released.
+
+2008-04-09  Reiner Steib  <[email protected]>
+
+	* gnus.texi (Oort Gnus): Mention customizing of tool bars.
+
 2008-04-09  Reiner Steib  <[email protected]>
 
 	* gnus-news.texi: Update tool bar item.
@@ -60,6 +90,12 @@
 	(Formatting Fonts): Add index entries for gnus-mouse-face, gnus-face-0,
 	gnus-balloon-face-0 and the corresponding format specifiers.
 
+2008-03-14  Stefan Monnier  <[email protected]>
+
+	* gnus.texi (Example Methods, Direct Functions, Indirect Functions)
+	(Common Variables): Give precedence to the netcat methods over the
+	telnet methods, and mention that they are more reliable.
+
 2008-03-08  Reiner Steib  <[email protected]>
 
 	* gnus.texi (Mail Source Customization, Gnus Development, Oort Gnus):
@@ -241,7 +277,7 @@
 	(Misc Group Stuff): Move gnus-group-name-charset-method-alist and
 	gnus-group-name-charset-group-alist to Non-ASCII Group Names node.
 
-2007-08-31  Micha,Ak(Bl Cadilhac  <[email protected]>
+2007-08-31  Michaël Cadilhac  <[email protected]>
 
 	* gnus.texi (Mail Source Specifiers, IMAP): Add a notice on the need to
 	clean the output of the program `imap-shell-program'.
@@ -290,7 +326,7 @@
 
 	* Relicense all FSF files to GPLv3 or later.
 
-2007-07-20  Micha,Ak(Bl Cadilhac  <[email protected]>
+2007-07-20  Michaël Cadilhac  <[email protected]>
 
 	* gnus.texi (RSS): Document nnrss-ignore-article-fields.
 
@@ -351,7 +387,7 @@
 
 	* gnus.texi (Limiting): Document gnus-summary-limit-to-address.
 
-2007-05-11  Micha,Ak(Bl Cadilhac  <[email protected]>
+2007-05-11  Michaël Cadilhac  <[email protected]>
 
 	* gnus.texi (Group Maneuvering): Document
 	`gnus-summary-next-group-on-exit'.
@@ -511,7 +547,7 @@
 	* gnus.texi (Customizing Articles): Add index entries for all
 	gnus-treat-* variables.
 
-2006-12-29  Jouni K. Sepp,Ad(Bnen  <[email protected]>
+2006-12-29  Jouni K. Seppänen  <[email protected]>
 
 	* gnus.texi (IMAP): Fix incorrect explanation of
 	nnimap-search-uids-not-since-is-evil in documentation for
@@ -534,7 +570,7 @@
 	* gnus.texi (Spam Package Configuration Examples): Don't encourage to
 	rebind C-s.
 
-2006-12-26  Jouni K. Sepp,Ad(Bnen  <[email protected]>
+2006-12-26  Jouni K. Seppänen  <[email protected]>
 
 	* gnus.texi (Group Parameters, Group Maintenance, Topic Commands)
 	(Mail Group Commands, Expiring Mail, IMAP): Add index entries for
@@ -726,7 +762,7 @@
 
 	* gnus.texi (Summary Buffer Lines): Add `*'.
 
-2006-04-07  Jochen K,A|(Bpper  <[email protected]>
+2006-04-07  Jochen Küpper  <[email protected]>
 
 	* gnus.texi (Group Parameters): Mention
 	gnus-permanently-visible-groups.
@@ -1299,7 +1335,7 @@
 	* message.texi, gnus.texi: Update copyright.
 
 	* xml2texi.scm (+tag-for-gnus-faq-texi+): New variable.
-	(transform): Use it.  From Karl Pfl,Ad(Bsterer <[email protected]> with
+	(transform): Use it.  From Karl Pflästerer <[email protected]> with
 	minor modifications.
 	(boilerplate): Update copyright for the output file.
 
@@ -1313,7 +1349,7 @@
 	(transform): Avoid redundant entries in @urefs.
 	(format-node): Don't insert optional arguments of @node.
 
-2005-03-20  Karl Pfl,Ad(Bsterer  <[email protected]>
+2005-03-20  Karl Pflästerer  <[email protected]>
 
 	* xml2texi.scm, xml2texi.sh: New files.  PLT Scheme program to
 	convert FAQ from xml to texi.
@@ -1386,7 +1422,7 @@
 	* Makefile.in (.texi): Use LC_ALL instead of LANG.
 	(makeinfo): Ditto.
 
-2005-01-04  Jochen K,A|(Bpper  <[email protected]>
+2005-01-04  Jochen Küpper  <[email protected]>
 
 	* gnus.texi (Group Parameters): Slight extension of sieve
 	parameter description.
@@ -1814,7 +1850,7 @@
 
 	* texi2latex.el (latexi-translate-file): Support accents.
 
-	* gnus.texi: Don't use 8bit chars (except ,A,(B).
+	* gnus.texi: Don't use 8bit chars (except ¬).
 
 	* emacs-mime.texi: do.
 
@@ -2376,17 +2412,17 @@
 	* gnus.texi (Customizing Articles): Ditto.
 	* gnus.texi (Image Enhancements): Put the Face node into the menu.
 
-2003-06-17  Kai Gro,A_(Bjohann  <[email protected]>
+2003-06-17  Kai Großjohann  <[email protected]>
 
 	* gnus.texi (Splitting Mail): Add "splitting" entry and concept
-	index entries.  Small patch from Karl Pfl,Ad(Bsterer
+	index entries.  Small patch from Karl Pflästerer
 	<[email protected]>.
 
 2003-06-15  Reiner Steib  <[email protected]>
 
 	* gnus.texi (Daemons): Fixed typo.
 
-2003-06-15  Kai Gro,A_(Bjohann  <[email protected]>
+2003-06-15  Kai Großjohann  <[email protected]>
 
 	* message.texi (Message Headers): Extend
 	`message-subject-re-regexp' example.  From Niklas Morberg
@@ -2483,7 +2519,7 @@
 
 	* gnus.texi (Oort Gnus): Fix typo.
 
-2003-05-03  Kai Gro,A_(Bjohann  <[email protected]>
+2003-05-03  Kai Großjohann  <[email protected]>
 
 	* gnus.texi (Agent Basics): Explain that some servers can be
 	agentized, whereas others aren't.
@@ -2593,7 +2629,7 @@
 
 	* gnus.texi (Server Variables): Added server parameters and index.
 
-2003-04-21  Kai Gro,A_(Bjohann  <[email protected]>
+2003-04-21  Kai Großjohann  <[email protected]>
 
 	* gnus.texi (Group Parameters): Pointer to
 	gnus-newsgroup-variables.
@@ -2936,7 +2972,7 @@
 
 	* gnus.texi (Picons): Update.
 
-2003-01-22  Kai Gro,A_(Bjohann  <[email protected]>
+2003-01-22  Kai Großjohann  <[email protected]>
 
 	* gnus.texi (Agent Expiry, Agent Variables): Don't use @pxref for
 	index entries.
@@ -3187,7 +3223,7 @@
 	* message.texi (Message Headers): Added example.
 	(Message Headers): Addition.
 
-2002-12-31  Kai Gro,A_(Bjohann  <[email protected]>
+2002-12-31  Kai Großjohann  <[email protected]>
 
 	* gnus.texi (Top): Add pointers to related manuals.  Suggested by
 	Reiner Steib.
@@ -3231,14 +3267,14 @@
 
 	* gnus.texi (Mail): Explain nil value of gnus-uu-digest-headers.
 
-2002-12-10  Kai Gro,A_(Bjohann  <[email protected]>
+2002-12-10  Kai Großjohann  <[email protected]>
 
 	* gnus.texi (Posting Styles): Clarify the `(header MATCH REGEXP)'
 	case.
 	(Back End Interface): Mention nnnotbackends.  Suggested by Jan
 	Rychter.
 
-2002-11-29  Kai Gro,A_(Bjohann  <[email protected]>
+2002-11-29  Kai Großjohann  <[email protected]>
 
 	* gnus.texi (MIME Commands): Document gnus-inhibit-mime-unbuttonizing.
 
@@ -3285,7 +3321,7 @@
 	* gnus.texi (Expiring in IMAP): Add.
 	(Group Parameters): Add reference.
 
-2002-11-16  Kai Gro,A_(Bjohann  <[email protected]>
+2002-11-16  Kai Großjohann  <[email protected]>
 
 	* gnus.texi (Expiring Mail): Give summary on difference between
 	auto-expire and total-expire and provide information for choosing
@@ -3305,7 +3341,7 @@
 	* gnus.texi (RSS): Add gnus-summary-mark-as-read-forward into the
 	example code. From Christoph Conrad <[email protected]>.
 
-2002-10-17  Kai Gro,A_(Bjohann  <[email protected]>
+2002-10-17  Kai Großjohann  <[email protected]>
 
 	* gnus.texi (Other Marks): Document gnus-downloadable-mark and
 	gnus-undownloaded-mark.  Adapted idea from Sriram Karra
@@ -3342,7 +3378,7 @@
 
 	* pgg.texi: New file.
 
-2002-10-03  Kai Gro,A_(Bjohann  <[email protected]>
+2002-10-03  Kai Großjohann  <[email protected]>
 
 	* gnus.texi (Group Information): Mention prefix argument for
 	gnus-group-fetch-charter and gnus-group-fetch-control.
@@ -3368,19 +3404,19 @@
 
 	* gnus.texi (A note on namespaces): New.
 
-2002-09-16  Kai Gro,A_(Bjohann  <[email protected]>
+2002-09-16  Kai Großjohann  <[email protected]>
 
 	* gnus.texi (Splitting Mail): "By default, splitting is performed
 	on all incoming messages."  This sentence had a "not" too many.
 	Explicitly say that `nnmail-resplit-incoming' has effect only for
 	`directory' mail-sources entries.
 
-2002-09-15  Kai Gro,A_(Bjohann  <[email protected]>
+2002-09-15  Kai Großjohann  <[email protected]>
 
 	* gnus.texi (Mail Source Specifiers): Say "one-to-one
 	correspondence" in the description of `directory'.
 
-2002-09-11  Kai Gro,b_(Bjohann  <[email protected]>
+2002-09-11  Kai Großjohann  <[email protected]>
 
 	* gnus.texi (Top, Summary Buffer): Add info to "Delayed Articles"
 	menu line.
@@ -3398,7 +3434,7 @@
 
 	* gnus.texi (Other Marks): Fix.
 
-2002-09-09  Kai Gro,b_(Bjohann  <[email protected]>
+2002-09-09  Kai Großjohann  <[email protected]>
 
 	* gnus.texi (Splitting Mail): Typo.
 	(Comparing Mail Back Ends): Say "back end" instead of "backend".
@@ -3408,7 +3444,7 @@
 
 	* gnus.texi (Article Buttons): Add.
 
-2002-09-09  Kai Gro,b_(Bjohann  <[email protected]>
+2002-09-09  Kai Großjohann  <[email protected]>
 
 	* gnus.texi (Splitting Mail): Document nnmail-resplit-incoming,
 	xref to Mail Source Specifiers.
@@ -3462,12 +3498,12 @@
 	(MIME Commands): Index gnus-article-decode-mime-words,
 	gnus-article-decode-charset and gnus-mime-view-all-parts.
 
-2002-08-20  Kai Gro,b_(Bjohann  <[email protected]>
+2002-08-20  Kai Großjohann  <[email protected]>
 
 	* gnus.texi (Mail Source Specifiers): Mention variable
 	nnmail-resplit-incoming under `directory' specifier.
 
-2002-08-18  Kai Gro,b_(Bjohann  <[email protected]>
+2002-08-18  Kai Großjohann  <[email protected]>
 
 	* gnus.texi (Summary Buffer Lines): Document the %k specifier.
 
@@ -3485,7 +3521,7 @@
 
 	* gnus.texi (Summary Sorting): Document randomization.
 
-2002-07-28  Kai Gro,b_(Bjohann  <[email protected]>
+2002-07-28  Kai Großjohann  <[email protected]>
 
 	* gnus.texi (Web Searches): Added gmane and removed old
 	non-functioning search engines.  From Niklas Morberg
@@ -3506,7 +3542,7 @@
 	regenerate overviews via server buffer, and note to news admins
 	about overview.fmt.
 
-2002-07-14  Kai Gro,b_(Bjohann  <[email protected]>
+2002-07-14  Kai Großjohann  <[email protected]>
 
 	* gnus.texi (Posting Styles): Fix example (it was using the To
 	header instead of the From header).  From Christopher Splinter
@@ -3526,12 +3562,12 @@
 
 	* gnus.texi (NNTP): Doc fix.
 
-2002-07-02  Kai Gro,b_(Bjohann  <[email protected]>
+2002-07-02  Kai Großjohann  <[email protected]>
 
 	* gnus.texi (Washing Mail): Document the shortcoming of
 	nnmail-remove-leading-whitespace.
 
-2002-06-30  Kai Gro,b_(Bjohann  <[email protected]>
+2002-06-30  Kai Großjohann  <[email protected]>
 
 	* message.texi (News Headers): Include example for removing an
 	entry from message-required-news-headers.
@@ -3540,14 +3576,14 @@
 
 	* gnus.texi (NNTP): Add nntp-via-rlogin-command-switches.
 
-2002-06-27  Kai Gro,b_(Bjohann  <[email protected]>
+2002-06-27  Kai Großjohann  <[email protected]>
 
 	* gnus.texi (Mail Back End Variables): Document
 	nnmail-cache-ignore-groups.  Xref Fancy Mail Splitting.
 	(Fancy Mail Splitting): Mention nnmail-cache-ignore-groups and
 	why it is useful.
 
-2002-06-25  Kai Gro,b_(Bjohann  <[email protected]>
+2002-06-25  Kai Großjohann  <[email protected]>
 
 	* gnus.texi (Fancy Mail Splitting): Include all necessary
 	variables in the Lisp example.
@@ -3573,7 +3609,7 @@
 
 	* gnus.texi (Loose Threads): Add gnus-simplify-all-whitespace.
 
-2002-05-08  Kai Gro,A_(Bjohann  <[email protected]>
+2002-05-08  Kai Großjohann  <[email protected]>
 
 	* gnus.texi (Mail-To-News Gateways): The default
 	nngateway-header-transformation function inserts a "To" header,
@@ -3643,7 +3679,7 @@
 	message-gen-unsubscribed-mft.
 	From Karra <[email protected]>.
 
-2002-04-05  Kai Gro,A_(Bjohann  <[email protected]>
+2002-04-05  Kai Großjohann  <[email protected]>
 
 	* gnus.texi (Saving Articles): Add xref to Mail Group Commands
 	because people might be interested in `B c' for saving articles.
@@ -3800,11 +3836,11 @@
 
 	* message.texi (Various Commands): use the proper @point glyph.
 
-	* gnus.texi (Summary Mail Commands): ,A_(B doesn't work.  A German
+	* gnus.texi (Summary Mail Commands): ß doesn't work.  A German
 	spelling reform changed the correct spelling to "muss" anyway (I
 	think).
 
-	* gnus.texi (Mail sources): ,A'(B doesn't work. Use "section" instead.
+	* gnus.texi (Mail sources): § doesn't work. Use "section" instead.
 
 	* gnus.texi (Mail Source Specifiers): use @url.
 
@@ -4126,7 +4162,7 @@
 	* gnus.texi (Summary Mail Commands): advertise
 	`gnus-summary-news-other-window'.
 
-2001-12-10  Kai Gro,A_(Bjohann  <[email protected]>
+2001-12-10  Kai Großjohann  <[email protected]>
 
 	* gnus.texi (Advanced Scoring Examples): Clarify that the
 	examples are rules, not complete score files.
@@ -4135,7 +4171,7 @@
 
 	* gnus.texi (Expiring Mail): Add.
 
-2001-12-05  Kai Gro,A_(Bjohann  <[email protected]>
+2001-12-05  Kai Großjohann  <[email protected]>
 
 	* gnus.texi (Splitting in IMAP): Typo.  From Colin Marquardt
 	<[email protected]>.
@@ -4209,7 +4245,7 @@
 	* message.texi (Security):
 	* emacs-mime.texi (MML Definition): Add PGP.
 
-2001-11-09  Kai Gro,A_(Bjohann  <[email protected]>
+2001-11-09  Kai Großjohann  <[email protected]>
 
 	* message.texi (Movement): message-beginning-of-line.
 
@@ -4291,11 +4327,11 @@
 	* gnus.texi (Posting Server): Use `native' instead of `nil' for
 	posting to native server.
 
-2001-10-22  Kai Gro,A_(Bjohann  <[email protected]>
+2001-10-22  Kai Großjohann  <[email protected]>
 
 	* dir (File): Add standard explanation header.
 
-2001-10-21  Kai Gro,A_(Bjohann  <[email protected]>
+2001-10-21  Kai Großjohann  <[email protected]>
 
 	* gnus.texi (Mail Source Specifiers): Explain more explicitly what
 	happens for the `directory' entries.  Say that mail from foo.spool
@@ -4308,7 +4344,7 @@
 
 	* gnus.texi (Using MIME): s/mime/MIME/ for PDF version.
 
-2001-10-19  Kai Gro,A_(Bjohann  <[email protected]>
+2001-10-19  Kai Großjohann  <[email protected]>
 
 	* gnus.texi (Finding the News): Disrecommend nnspool for Leafnode
 	users.
@@ -4494,7 +4530,7 @@
 
 	* gnus.texi (MIME Commands): Add gnus-buttonized-mime-types.
 
-2001-09-08  Kai Gro,A_(Bjohann  <[email protected]>
+2001-09-08  Kai Großjohann  <[email protected]>
 
 	* gnus.texi (Topic Commands): Make this the first subsection of
 	`Group Topics'.  Rearrange keys to mention the most important keys
@@ -4502,7 +4538,7 @@
 	C-k/C-y.
 	(Group Buffer): Add comment from Alex Schroeder as todo item.
 
-2001-09-06  Kai Gro,A_(Bjohann  <[email protected]>
+2001-09-06  Kai Großjohann  <[email protected]>
 
 	* gnus.texi (Fancy Mail Splitting): Mention `delete' near the
 	explanation of `junk'.
@@ -4513,12 +4549,12 @@
 	make a date format is `message-make-date', which should produce a
 	time zone.
 
-2001-09-04  Kai Gro,A_(Bjohann  <[email protected]>
+2001-09-04  Kai Großjohann  <[email protected]>
 
 	* gnus.texi (Optional Backend Functions): More detail about the
 	DATE arg for nnchoke-request-newgroups.  Reported by Paul Jarc.
 
-2001-09-01  Kai Gro,A_(Bjohann  <[email protected]>
+2001-09-01  Kai Großjohann  <[email protected]>
 
 	* gnus.texi (Hooking New Backends Into Gnus): Say where to put the
 	call for gnus-declare-backend.  Add an index entry for
@@ -4569,7 +4605,7 @@
 
 	* gnus.texi (Score Variables): Fix.
 
-2001-08-20  Kai Gro,A_(Bjohann  <[email protected]>
+2001-08-20  Kai Großjohann  <[email protected]>
 
 	* gnus.texi (Delayed Articles): New section.  Documents
 	gnus-delay.el.
@@ -4582,7 +4618,7 @@
 	(Positioning Point): New.
 	(Tabulation): New.
 
-2001-08-19  Kai Gro,A_(Bjohann  <[email protected]>
+2001-08-19  Kai Großjohann  <[email protected]>
 
 	* gnus.texi (Getting Started Reading Mail): Use (nnml "") rather
 	than (nnml "private") as the example server specification.  This
@@ -4626,7 +4662,7 @@
 	Configuration'.  After all, we're not talking about Microsoft.
 	Suggested by Barry Fishman.
 
-2001-08-11  Kai Gro,A_(Bjohann  <[email protected]>
+2001-08-11  Kai Großjohann  <[email protected]>
 
 	* gnus.texi (Summary Mail Commands): Remove duplicate explanation
 	of `S W'.  Reported by Norbert Koch.
@@ -4641,11 +4677,11 @@
 
 	* gnus.texi (Mail Backend Variables): Fix.
 
-2001-08-04  Kai Gro,A_(Bjohann  <[email protected]>
+2001-08-04  Kai Großjohann  <[email protected]>
 
 	* gnus.texi (Summary Buffer Lines): Mention `gnus-goto-colon'.
 
-2001-08-03  Kai Gro,A_(Bjohann  <[email protected]>
+2001-08-03  Kai Großjohann  <[email protected]>
 
 	* gnus.texi (Backend Interface): Explain about article numbers.
 	Suggested by Paul Jarc.
@@ -4682,7 +4718,7 @@
 	* gnus.texi (Fancy Mail Splitting): New variable
 	nnmail-split-fancy-with-parent-ignore-groups
 
-2001-07-24  Kai Gro,A_(Bjohann  <[email protected]>
+2001-07-24  Kai Großjohann  <[email protected]>
 
 	* gnus.texi (Duplicates): Make split method regexp more specific,
 	in case other `Gnus-Warning' headers are added in the future.
@@ -4706,7 +4742,7 @@
 
 	* gnus.texi (Searching for Articles): Raw articles.
 
-2001-07-16  Kai Gro,A_(Bjohann  <[email protected]>
+2001-07-16  Kai Großjohann  <[email protected]>
 
 	* message.texi (Insertion): Refer to gnus-cite-attribution-suffix.
 
@@ -4741,12 +4777,12 @@
 
 	* gnus.texi (MIME Commands): Add.
 
-2001-06-24  Kai Gro,A_(Bjohann  <[email protected]>
+2001-06-24  Kai Großjohann  <[email protected]>
 
 	* gnus.texi (Summary Score Commands): Say that some commands
 	create ADAPT files.
 
-2001-06-23  Kai Gro,A_(Bjohann  <[email protected]>
+2001-06-23  Kai Großjohann  <[email protected]>
 
 	* gnus.texi (Duplicates): Contents of Gnus-Warning header have
 	changed.  Reported by Peter J Acklam.
@@ -4757,7 +4793,7 @@
 
 	* gnus-faq.texi (Frequently Asked Questions): Fix URL.
 
-2001-06-17  Kai Gro,A_(Bjohann  <[email protected]>
+2001-06-17  Kai Großjohann  <[email protected]>
 
 	* gnus.texi (Group Line Specification): Explain why %t is only an
 	estimate.
@@ -4850,12 +4886,12 @@
 	* gnus.texi: Remove a few The's.
 	(RSS): New.
 
-2001-04-26  Kai Gro,A_(Bjohann  <[email protected]>
+2001-04-26  Kai Großjohann  <[email protected]>
 
 	* gnus.texi (Unread Articles): Say that dormants are similar to
 	ticked.
 
-2001-04-13  Kai Gro,A_(Bjohann  <[email protected]>
+2001-04-13  Kai Großjohann  <[email protected]>
 
 	* gnus.texi (Sorting Groups): Note `C-k' and `C-y' for manually
 	moving groups around.
@@ -4887,12 +4923,12 @@
 
 	* message.texi (Security): Typos.
 
-2001-03-15  Kai Gro,A_(Bjohann  <[email protected]>
+2001-03-15  Kai Großjohann  <[email protected]>
 
 	* gnus.texi (Hiding Headers): Typos.  Reported by Sriram Karra
 	<[email protected]>.
 
-2001-03-11  Kai Gro,A_(Bjohann  <[email protected]>
+2001-03-11  Kai Großjohann  <[email protected]>
 
 	* message.texi (Message Headers): Update doc for
 	`message-generate-headers-first'.
@@ -4907,7 +4943,7 @@
 
 	* infohack.el (infohack): Set max-lisp-eval-depth to 600+.
 
-2001-03-03  Kai Gro,A_(Bjohann  <[email protected]>
+2001-03-03  Kai Großjohann  <[email protected]>
 
 	* gnus.texi (Posting Styles): Posting styles have (NAME VALUE),
 	not (NAME . VALUE).
@@ -4938,7 +4974,7 @@
 
 	* gnus.texi (Optional Backend Functions): Fix case.
 
-2001-02-14  Kai Gro,A_(Bjohann  <[email protected]>
+2001-02-14  Kai Großjohann  <[email protected]>
 
 	* gnus.texi (Unread Articles): Say that Gnus itself never expires
 	ticked articles.  Suggested by M D Greenhow
@@ -4961,11 +4997,11 @@
 	* gnus.texi (Pterodactyl Gnus): Added.
 	(Newest Features): Removed. Suggested by RMS.
 
-2001-02-08  Kai Gro,A_(Bjohann  <[email protected]>
+2001-02-08  Kai Großjohann  <[email protected]>
 
 	* gnus.texi (Group Parameters): Mention `G c' in addition to `G p'.
 
-2001-02-07  Kai Gro,A_(Bjohann  <[email protected]>
+2001-02-07  Kai Großjohann  <[email protected]>
 
 	* gnus.texi (To From Newsgroups): Make it clear where to put the
 	sample code.  Suggested by Dan Jacobson.
@@ -4973,7 +5009,7 @@
 	* gnus.texi (Mail Source Specifiers, IMAP, Agent and IMAP):
 	Improve IMAP discussion.
 
-2001-02-07  Kai Gro,A_(Bjohann  <[email protected]>
+2001-02-07  Kai Großjohann  <[email protected]>
 
 	* message.texi (Message Headers): `message-generate-headers-first'.
 
@@ -5034,7 +5070,7 @@
 
 	* message.texi (Security): Requires OpenSSL 0.9.6+.
 
-2001-01-13  Kai Gro,A_(Bjohann  <[email protected]>
+2001-01-13  Kai Großjohann  <[email protected]>
 
 	* gnus.texi (Mail): Move explanation of
 	`message-send-mail-partially-limit' to message.texi
@@ -5049,7 +5085,7 @@
 
 	* gnus.texi (myself): Quote .
 
-2001-01-05  Kai Gro,A_(Bjohann  <[email protected]>
+2001-01-05  Kai Großjohann  <[email protected]>
 
 	* gnus.texi (Choosing Commands): Add xref for redisplaying the
 	group.  Suggestion from Galen Boyer <[email protected]>.
@@ -5068,13 +5104,13 @@
 
 	* texi2latex.el (latexi-translate-file): Ignore anchor.
 
-2001-01-04  Kai Gro,A_(Bjohann  <[email protected]>
+2001-01-04  Kai Großjohann  <[email protected]>
 
 	* gnus.texi (Article Washing): Refer to `Customizing Articles' for
 	permanent changes.  Suggested by Russell Marks (russel dot marks
 	at ntlworld dot com).
 
-2001-01-03  Kai Gro,A_(Bjohann  <[email protected]>
+2001-01-03  Kai Großjohann  <[email protected]>
 
 	* gnus.texi (Article Washing): Mention `C-u g' as a sort of
 	anti-washing.
@@ -5087,7 +5123,7 @@
 
 	* texi2latex.el (latexi-translate-file): Understand uref.
 
-2000-12-30  Kai Gro,A_(Bjohann  <[email protected]>
+2000-12-30  Kai Großjohann  <[email protected]>
 
 	* gnus.texi (Selecting a Group): Explain in more detail, what a
 	prefix arg means for SPC.  Refer people to M-g command from
@@ -5141,7 +5177,7 @@
 	* gnus.texi (Adaptive Scoring): Use setq by Thomas Seck
 	<[email protected]>.
 
-2000-12-21  Kai Gro,A_(Bjohann  <[email protected]>
+2000-12-21  Kai Großjohann  <[email protected]>
 
 	* gnus.texi (Article Washing): Doc addition by Paul Stevenson
 	<[email protected]>.
@@ -5159,7 +5195,7 @@
 
 	* gnus.texi (Archived Messages): Add.
 
-2000-11-20 Jochen K,A|(Bpper <[email protected]>
+2000-11-20 Jochen Küpper <[email protected]>
 
 	* gnus.texi (Security): Fix typo.
 
@@ -5185,7 +5221,7 @@
 	* emacs-mime.texi (MML Definition): Add sign, encrypt, keyfile and
 	certfile.
 
-2000-11-07  Kai Gro,A_(Bjohann  <[email protected]>
+2000-11-07  Kai Großjohann  <[email protected]>
 
 	* gnus.texi (Mail Group Commands): `gnus-move-split-methods' uses
 	group names as target, where `gnus-split-methods' uses file
@@ -5195,7 +5231,7 @@
 
 	* gnus.texi: Doc fix.
 
-2000-11-01  Kai Gro,A_(Bjohann  <[email protected]>
+2000-11-01  Kai Großjohann  <[email protected]>
 
 	* gnus.texi (Fancy Mail Splitting): Explain
 	`nnmail-split-fancy-with-parent'.
@@ -5212,18 +5248,18 @@
 
 	* gnus.texi (NNTP): Explain `port'.
 
-2000-10-30  Kai Gro,A_(Bjohann  <[email protected]>
+2000-10-30  Kai Großjohann  <[email protected]>
 
 	* gnus.texi (Archived Messages): Explain what happens when group
 	names mentioned in `gnus-message-archive-group' contain a select
 	method.
 
-2000-10-28  Kai Gro,A_(Bjohann  <[email protected]>
+2000-10-28  Kai Großjohann  <[email protected]>
 
 	* gnus.texi (Group Levels): Explain meaning of subscribed,
 	unsubscribed, zombie, killed groups.
 
-2000-10-26  Kai Gro,A_(Bjohann  <[email protected]>
+2000-10-26  Kai Großjohann  <[email protected]>
 
 	* gnus.texi (Gnus Development): nnmail-delete-incoming -->
 	mail-source-delete-incoming.  Suggested by Karl Kleinpaste
@@ -5237,10 +5273,10 @@
 
 	* gnus.texi (IMAP): Add.
 
-2000-10-05  Kai Gro,A_(Bjohann  <[email protected]>
+2000-10-05  Kai Großjohann  <[email protected]>
 
 	* gnus.texi (Windows Configuration): add examples; first example
-	suggested by Stein A. Str,Ax(Bmme <[email protected]>.  (The actual
+	suggested by Stein A. Strømme <[email protected]>.  (The actual
 	Lisp code is also from him.)
 
 2000-10-07  Dave Love  <[email protected]>
@@ -5293,7 +5329,7 @@
 
 	* gnus.texi (IMAP): Add examples.
 
-2000-09-19  Kai Gro,A_(Bjohann  <[email protected]>
+2000-09-19  Kai Großjohann  <[email protected]>
 
 	* gnus.texi (IMAP): Add pointer to description of ~/.authinfo file
 	format.
@@ -6063,7 +6099,7 @@
   Boston, MA 02110-1301, USA.
 
 ;; Local Variables:
-;; coding: iso-2022-7bit
+;; coding: utf-8
 ;; fill-column: 79
 ;; add-log-time-zone-rule: t
 ;; End:
Index: gnus/texi/gnus.texi
diff -u gnus/texi/gnus.texi:7.280 gnus/texi/gnus.texi:7.285
--- gnus/texi/gnus.texi:7.280	Thu Apr 10 20:55:45 2008
+++ gnus/texi/gnus.texi	Thu May  1 23:52:35 2008
@@ -52,7 +52,7 @@
 \begin{document}
 
 % Adjust ../Makefile.in if you change the following line:
-\newcommand{\gnusversionname}{No Gnus v0.8}
+\newcommand{\gnusversionname}{No Gnus v0.10}
 \newcommand{\gnuschaptername}{}
 \newcommand{\gnussectionname}{}
 
@@ -362,7 +362,7 @@
 luck.
 
 @c Adjust ../Makefile.in if you change the following line:
-This manual corresponds to No Gnus v0.8.
+This manual corresponds to No Gnus v0.10.
 
 @end ifinfo
 
@@ -392,7 +392,7 @@
 the program.
 
 @c Adjust ../Makefile.in if you change the following line:
-This manual corresponds to No Gnus v0.8.
+This manual corresponds to No Gnus v0.10.
 
 @heading Other related manuals
 @itemize
@@ -10763,6 +10763,13 @@
 @end lisp
 
 Also @pxref{Group Parameters}.
+
+@vindex gnus-propagate-marks
+@item gnus-propagate-marks
+If non-@code{nil}, propagate marks to the backends for possible
+storing.  @xref{NNTP marks}, and friends, for a more fine-grained
+sieve.
+
 @end table
 
 
@@ -13103,16 +13110,17 @@
 
 If you are behind a firewall and only have access to the @acronym{NNTP}
 server from the firewall machine, you can instruct Gnus to @code{rlogin}
-on the firewall machine and telnet from there to the @acronym{NNTP} server.
+on the firewall machine and connect with
+@uref{http://netcat.sourceforge.net/, netcat} from there to the
+@acronym{NNTP} server.
 Doing this can be rather fiddly, but your virtual server definition
 should probably look something like this:
 
 @lisp
 (nntp "firewall"
-      (nntp-open-connection-function nntp-open-via-rlogin-and-telnet)
+      (nntp-open-connection-function nntp-open-via-rlogin-and-netcat)
       (nntp-via-address "the.firewall.machine")
-      (nntp-address "the.real.nntp.host")
-      (nntp-end-of-line "\n"))
+      (nntp-address "the.real.nntp.host"))
 @end lisp
 
 If you want to use the wonderful @code{ssh} program to provide a
@@ -13125,6 +13133,7 @@
 
 See also @code{nntp-via-rlogin-command-switches}.  Here's an example for
 an indirect connection:
+
 @lisp
 (setq gnus-select-method
       '(nntp "indirect"
@@ -13132,28 +13141,24 @@
              (nntp-via-user-name "intermediate_user_name")
              (nntp-via-address "intermediate.host.example")
              (nntp-via-rlogin-command "ssh")
-             (nntp-end-of-line "\n")
-             (nntp-via-rlogin-command-switches ("-C" "-t" "-e" "none"))
-             (nntp-open-connection-function nntp-open-via-rlogin-and-telnet)))
+             (nntp-via-rlogin-command-switches ("-C"))
+             (nntp-open-connection-function nntp-open-via-rlogin-and-netcat)))
 @end lisp
 
+This means that you have to have set up @code{ssh-agent} correctly to
+provide automatic authorization, of course.
+
 If you're behind a firewall, but have direct access to the outside world
 through a wrapper command like "runsocks", you could open a socksified
-telnet connection to the news server as follows:
+netcat connection to the news server as follows:
 
 @lisp
 (nntp "outside"
       (nntp-pre-command "runsocks")
-      (nntp-open-connection-function nntp-open-via-telnet)
-      (nntp-address "the.news.server")
-      (nntp-end-of-line "\n"))
+      (nntp-open-connection-function nntp-open-netcat-stream)
+      (nntp-address "the.news.server"))
 @end lisp
 
-This means that you have to have set up @code{ssh-agent} correctly to
-provide automatic authorization, of course.  And to get a compressed
-connection, you have to have the @samp{Compression} option in the
-@code{ssh} @file{config} file.
-
 
 @node Creating a Virtual Server
 @subsection Creating a Virtual Server
@@ -13620,11 +13625,11 @@
       (nntp-address "snews.bar.com"))
 @end lisp
 
-@findex nntp-open-telnet-stream
-@item nntp-open-telnet-stream
-Opens a connection to an @acronym{NNTP} server by simply @samp{telnet}'ing
-it.  You might wonder why this function exists, since we have the
-default @code{nntp-open-network-stream} which would do the job.  (One
+@findex nntp-open-netcat-stream
+@item nntp-open-netcat-stream
+Opens a connection to an @acronym{NNTP} server using the @code{netcat}
+program.  You might wonder why this function exists, since we have
+the default @code{nntp-open-network-stream} which would do the job.  (One
 of) the reason(s) is that if you are behind a firewall but have direct
 connections to the outside world thanks to a command wrapper like
 @code{runsocks}, you can use it like this:
@@ -13632,12 +13637,27 @@
 @lisp
 (nntp "socksified"
       (nntp-pre-command "runsocks")
-      (nntp-open-connection-function nntp-open-telnet-stream)
+      (nntp-open-connection-function nntp-open-netcat-stream)
       (nntp-address "the.news.server"))
 @end lisp
 
 With the default method, you would need to wrap your whole Emacs
 session, which is not a good idea.
+
+@findex nntp-open-telnet-stream
+@item nntp-open-telnet-stream
+Like @code{nntp-open-netcat-stream}, but uses @code{telnet} rather than
+@code{netcat}.  @code{telnet} is a bit less robust because of things
+like line-end-conversion, but sometimes netcat is simply
+not available.  The previous example would turn into:
+
+@lisp
+(nntp "socksified"
+      (nntp-pre-command "runsocks")
+      (nntp-open-connection-function nntp-open-telnet-stream)
+      (nntp-address "the.news.server")
+      (nntp-end-of-line "\n"))
+@end lisp
 @end table
 
 
@@ -13653,13 +13673,13 @@
 commonly understood variables (@pxref{Common Variables}).
 
 @table @code
-@item nntp-open-via-rlogin-and-telnet
-@findex nntp-open-via-rlogin-and-telnet
-Does an @samp{rlogin} on a remote system, and then does a @samp{telnet}
+@item nntp-open-via-rlogin-and-netcat
+@findex nntp-open-via-rlogin-and-netcat
+Does an @samp{rlogin} on a remote system, and then uses @code{netcat} to connect
 to the real @acronym{NNTP} server from there.  This is useful for instance if
 you need to connect to a firewall machine first.
 
-@code{nntp-open-via-rlogin-and-telnet}-specific variables:
+@code{nntp-open-via-rlogin-and-netcat}-specific variables:
 
 @table @code
 @item nntp-via-rlogin-command
@@ -13672,35 +13692,28 @@
 List of strings to be used as the switches to
 @code{nntp-via-rlogin-command}.  The default is @code{nil}.  If you use
 @samp{ssh} for @code{nntp-via-rlogin-command}, you may set this to
-@samp{("-C")} in order to compress all data connections, otherwise set
-this to @samp{("-t" "-e" "none")} or @samp{("-C" "-t" "-e" "none")} if
-the telnet command requires a pseudo-tty allocation on an intermediate
-host.
+@samp{("-C")} in order to compress all data connections.
 @end table
 
-Note that you may want to change the value for @code{nntp-end-of-line}
-to @samp{\n} (@pxref{Common Variables}).
-
-@item nntp-open-via-rlogin-and-netcat
-@findex nntp-open-via-rlogin-and-netcat
-Does essentially the same, but uses
-@uref{http://netcat.sourceforge.net/, netcat} instead of @samp{telnet}
+@item nntp-open-via-rlogin-and-telnet
+@findex nntp-open-via-rlogin-and-telnet
+Does essentially the same, but uses @code{telnet} instead of @samp{netcat}
 to connect to the real @acronym{NNTP} server from the intermediate host.
+@code{telnet} is a bit less robust because of things like
+line-end-conversion, but sometimes @code{netcat} is simply not available.  
 
-@code{nntp-open-via-rlogin-and-netcat}-specific variables:
+@code{nntp-open-via-rlogin-and-telnet}-specific variables:
 
 @table @code
-@item nntp-via-netcat-command
-@vindex nntp-via-netcat-command
+@item nntp-telnet-command
+@vindex nntp-telnet-command
 Command used to connect to the real @acronym{NNTP} server from the
-intermediate host.  The default is @samp{nc}.  You can also use other
-programs like @uref{http://www.imasy.or.jp/~gotoh/ssh/connect.html,
-connect} instead.
+intermediate host.  The default is @samp{telnet}.
 
-@item nntp-via-netcat-switches
-@vindex nntp-via-netcat-switches
+@item nntp-telnet-switches
+@vindex nntp-telnet-switches
 List of strings to be used as the switches to the
-@code{nntp-via-telnet-command} command.  The default is @code{nil}.
+@code{nntp-telnet-command} command.  The default is @code{("-8")}.
 
 @item nntp-via-rlogin-command
 @vindex nntp-via-rlogin-command
@@ -13710,9 +13723,15 @@
 @item nntp-via-rlogin-command-switches
 @vindex nntp-via-rlogin-command-switches
 List of strings to be used as the switches to
-@code{nntp-via-rlogin-command}.  The default is @code{nil}.
+@code{nntp-via-rlogin-command}.  If you use @samp{ssh},  you may need to set
+this to @samp{("-t" "-e" "none")} or @samp{("-C" "-t" "-e" "none")} if
+the telnet command requires a pseudo-tty allocation on an intermediate
+host.  The default is @code{nil}.
 @end table
 
+Note that you may want to change the value for @code{nntp-end-of-line}
+to @samp{\n} (@pxref{Common Variables}).
+
 @item nntp-open-via-telnet-and-telnet
 @findex nntp-open-via-telnet-and-telnet
 Does essentially the same, but uses @samp{telnet} instead of
@@ -13806,17 +13825,17 @@
 server.  This is @samp{\r\n} by default, but should be @samp{\n} when
 using a non native telnet connection function.
 
-@item nntp-telnet-command
-@vindex nntp-telnet-command
+@item nntp-netcat-command
+@vindex nntp-netcat-command
 Command to use when connecting to the @acronym{NNTP} server through
-@samp{telnet}.  This is @emph{not} for an intermediate host.  This is
+@samp{netcat}.  This is @emph{not} for an intermediate host.  This is
 just for the real @acronym{NNTP} server.  The default is
-@samp{telnet}.
+@samp{nc}.
 
-@item nntp-telnet-switches
-@vindex nntp-telnet-switches
-A list of switches to pass to @code{nntp-telnet-command}.  The default
-is @samp{("-8")}.
+@item nntp-netcat-switches
+@vindex nntp-netcat-switches
+A list of switches to pass to @code{nntp-netcat-command}.  The default
+is @samp{()}.
 
 @end table
 
@@ -14564,7 +14583,7 @@
 
 @item :mailbox
 The name of the mailbox to get mail from.  The default is @samp{INBOX}
-which normally is the mailbox which receive incoming mail.
+which normally is the mailbox which receives incoming mail.
 
 @item :predicate
 The predicate used to find articles to fetch.  The default, @samp{UNSEEN
@@ -18959,9 +18978,9 @@
 
   This function is hooked into the @code{nndiary} back end, so that
 moving or copying an article to a diary group will trigger it
-automatically.  It is also bound to @kbd{C-c D c} in @code{message-mode}
-and @code{article-edit-mode} in order to ease the process of converting
-a usual mail to a diary one.
+automatically.  It is also bound to @kbd{C-c C-f d} in
+@code{message-mode} and @code{article-edit-mode} in order to ease the
+process of converting a usual mail to a diary one.
 
   This function takes a prefix argument which will force prompting of
 all diary headers, regardless of their presence or validity.  That way,
@@ -27929,7 +27948,12 @@
 @item You can now drag and drop attachments to the Message buffer.
 See @code{mml-dnd-protocol-alist} and @code{mml-dnd-attach-options}.
 @xref{MIME, ,MIME, message, Message Manual}.
-@c New in 5.10.9 / 5.11
+@c New in 5.10.9 / 5.11 (Emacs 21.1)
+
+@item @code{auto-fill-mode} is enabled by default in Message mode.
+See @code{message-fill-column}.  @xref{Various Message Variables, ,
+Message Headers, message, Message Manual}.
+@c New in Gnus 5.10.12 / 5.11 (Emacs 22.3)
 
 @end itemize
 
@@ -27982,8 +28006,9 @@
 
 @item
 The tool bars have been updated to use GNOME icons in Group, Summary and
-Message mode.  You can also customize the tool bars.  This is a new
-feature in Gnus 5.10.9.  (Only for Emacs, not in XEmacs.)
+Message mode.  You can also customize the tool bars: @kbd{M-x
+customize-apropos RET -tool-bar$} should get you started.  This is a new
+feature in Gnus 5.10.10.  (Only for Emacs, not in XEmacs.)
 
 @item The tool bar icons are now (de)activated correctly
 in the group buffer, see the variable @code{gnus-group-update-tool-bar}.
@@ -28553,7 +28578,7 @@
 @item
 Try doing an @kbd{M-x gnus-version}.  If you get something that looks
 like @c
-@samp{No Gnus v0.7} @c Adjust ../Makefile.in if you change this line!
+@samp{No Gnus v0.10} @c Adjust ../Makefile.in if you change this line!
 @c
 you have the right files loaded.  Otherwise you have some old @file{.el}
 files lying around.  Delete these.
Index: gnus/texi/message.texi
diff -u gnus/texi/message.texi:7.54 gnus/texi/message.texi:7.55
--- gnus/texi/message.texi:7.54	Thu Apr 10 20:55:45 2008
+++ gnus/texi/message.texi	Fri Apr 11 08:39:28 2008
@@ -71,7 +71,7 @@
 @c Adjust ../Makefile.in if you change the following lines:
 Message is distributed with Gnus.  The Gnus distribution
 @c
-corresponding to this manual is No Gnus v0.8.
+corresponding to this manual is No Gnus v0.9.
 
 
 @node Interface