Synch with Oort Gnus.
authoryamaoka <yamaoka>
Mon, 6 Jan 2003 08:28:00 +0000 (08:28 +0000)
committeryamaoka <yamaoka>
Mon, 6 Jan 2003 08:28:00 +0000 (08:28 +0000)
lisp/ChangeLog
lisp/gnus-agent.el
lisp/gnus-sum.el
lisp/nnheader.el
lisp/nntp.el
texi/gnus-ja.texi

index 3891842..66f3d53 100644 (file)
@@ -1,3 +1,59 @@
+2002-01-06  Kevin Greiner  <kgreiner@xpediantsolutions.com>
+
+       * gnus-agent.el (gnus-agent-fetch-group): Modified to permit execution
+       in either the group or summary buffer.  
+       New command "JS", in summary buffer, will fetch articles per the
+       group's category, predicate, and processable flags.
+       (gnus-agent-summary-fetch-series): Rewritten to call
+       gnus-agent-session-fetch-group once with all articles in the
+       series.
+       (gnus-agent-summary-fetch-group): Fixed bug and modified code to
+       return list of fetched articles.
+       (gnus-agent-fetch-articles): Split fetch list into sublists such
+       that the article buffer is only slightly larger than
+       gnus-agent-max-fetch-size.  Added unwind-protect to ensure that
+       the group's article alist is saved.
+       (gnus-agent-fetch-headers): The 'killed' and 'cached' marks no
+       longer result in the agent trying to fetch an article.
+       (gnus-agent-fetch-group-1): Can now be called in either the group
+       or summary buffer.  Removed the max-fetch-size code that I added
+       on 2002-12-13 as that capability is now part of
+       gnus-agent-fetch-articles.  Added code to update summary buffer.
+       When called in the group buffer, articles that can not be fetched
+       are AUTOMATICALLY MARKED AS READ.
+
+       * gnus-sum.el (): Modified eval-when-compile to minimize
+       misleading compilation warnings.
+       (gnus-update-summary-mark-positions): Changed code to use
+       gnus-undownloaded-mark rather than gnus-downloaded-mark.
+
+       * nnheader.el (nnheader-insert-nov-file): Do not try to insert an
+       empty file as the parser assumes that the file isn't empty.
+
+       * nntp.el (nntp-send-string): The process-send-string call can,
+       because it performs I/O on the process, change the process' state
+       from open to closed.  If this happens, call nntp-report
+       immediately to report the broken connection.
+       (nntp-report): Rewritten to avoid needing a global variable to
+       determine the appropriate course of action.  Instead, two function
+       implementations are provided and the nntp-report function value is
+       bound to the appropriate implementation.
+       (nntp-retrieve-data): Moved nntp-report call to end of implementation.
+       (nntp-with-open-group): Now binds nntp-report's function cell
+       rather than binding gnus-with-open-group-first-pass.  Added a
+       condition-case to detect a quit during a nntp command.  When the
+       quit occurs, the current connection is closed as a fetch articles
+       request could have several megabytes queued up for reading.
+       (nntp-retrieve-headers): Bind articles to itself.  If
+       nntp-with-open-group repeats this command, I must have access to
+       the original list of articles.
+       (nntp-retrieve-groups): Ditto for groups.
+       (nntp-retrieve-articles): Ditto for articles.
+       (*): Replaced nntp-possibly-change-group calls to
+       nntp-with-open-group forms in all, but one, occurrance.
+       (nntp-accept-process-output): Bug fix. Detect when called with
+       null process.
+       
 2003-01-06  Jesper Harder  <harder@ifa.au.dk>
 
        * mm-util.el (mm-find-mime-charset-region): Don't do Latin-9 hack
index 308cf39..404c14a 100644 (file)
@@ -345,6 +345,7 @@ node `(gnus)Server Buffer'.")
 (gnus-define-keys gnus-agent-summary-mode-map
   "Jj" gnus-agent-toggle-plugged
   "Ju" gnus-agent-summary-fetch-group
+  "JS" gnus-agent-fetch-group
   "Js" gnus-agent-summary-fetch-series
   "J#" gnus-agent-mark-article
   "J\M-#" gnus-agent-unmark-article
@@ -545,12 +546,13 @@ be a select method."
     (error "Groups can't be fetched when Gnus is unplugged"))
   (gnus-group-iterate n 'gnus-agent-fetch-group))
 
-(defun gnus-agent-fetch-group (group)
+(defun gnus-agent-fetch-group (&optional group)
   "Put all new articles in GROUP into the Agent."
   (interactive (list (gnus-group-group-name)))
   (let ((state gnus-plugged))
     (unwind-protect
        (progn
+          (setq group (or group gnus-newsgroup-name))
          (unless group
            (error "No group on the current line"))
          (unless state
@@ -793,17 +795,14 @@ article's mark is toggled."
 
 (defun gnus-agent-summary-fetch-series ()
   (interactive)
-  (let ((dl gnus-newsgroup-downloadable))
-    (while gnus-newsgroup-processable
-      (let* ((art (car (last gnus-newsgroup-processable)))
-             (gnus-newsgroup-downloadable (list art)))
-        (gnus-summary-goto-subject art)
-        (sit-for 0)
-        (gnus-agent-summary-fetch-group)
-        (setq dl (delq art dl))
-        (gnus-summary-remove-process-mark art)
-        (sit-for 0)))
-    (setq gnus-newsgroup-downloadable dl)))
+  (when gnus-newsgroup-processable
+    (setq gnus-newsgroup-downloadable
+          (let* ((dl gnus-newsgroup-downloadable)
+                 (gnus-newsgroup-downloadable (sort gnus-newsgroup-processable '<))
+                 (fetched-articles (gnus-agent-summary-fetch-group)))
+            (dolist (article fetched-articles)
+              (gnus-summary-remove-process-mark article))
+            (gnus-sorted-ndifference dl fetched-articles)))))
 
 (defun gnus-agent-summary-fetch-group (&optional all)
   "Fetch the downloadable articles in the group.
@@ -813,7 +812,8 @@ Optional arg ALL, if non-nil, means to fetch all articles."
         (if all gnus-newsgroup-articles
           gnus-newsgroup-downloadable))
        (gnus-command-method (gnus-find-method-for-group gnus-newsgroup-name))
-       (state gnus-plugged))
+       (state gnus-plugged)
+        fetched-articles)
     (unwind-protect
        (progn
          (unless state
@@ -821,19 +821,22 @@ Optional arg ALL, if non-nil, means to fetch all articles."
          (unless articles
            (error "No articles to download"))
          (gnus-agent-with-fetch
-             (setq gnus-newsgroup-undownloaded
-                   (gnus-sorted-ndifference gnus-newsgroup-undownloaded
-                                            (gnus-agent-fetch-articles gnus-newsgroup-name articles))))
+            (setq gnus-newsgroup-undownloaded
+                  (gnus-sorted-ndifference gnus-newsgroup-undownloaded
+                                           (setq fetched-articles (gnus-agent-fetch-articles gnus-newsgroup-name articles)))))
          (save-excursion
-           (dolist (article articles)
+
+(dolist (article articles)
              (setq gnus-newsgroup-downloadable
                    (delq article gnus-newsgroup-downloadable))
-             (if gnus-agent-mark-unread-after-downloaded
-                 (gnus-summary-mark-article article gnus-unread-mark))
-             (gnus-summary-update-download-mark article))))
+              (if gnus-agent-mark-unread-after-downloaded
+                  (gnus-summary-mark-article article gnus-unread-mark))
+              (when (gnus-summary-goto-subject article nil t)
+                (gnus-summary-update-download-mark article)))))
       (when (and (not state)
                 gnus-plugged)
-       (gnus-agent-toggle-plugged nil)))))
+       (gnus-agent-toggle-plugged nil)))
+    fetched-articles))
 
 (defun gnus-agent-fetch-selected-article ()
   "Fetch the current article as it is selected.
@@ -975,82 +978,118 @@ This can be added to `gnus-select-article-hook' or
 
 (defun gnus-agent-fetch-articles (group articles)
   "Fetch ARTICLES from GROUP and put them into the Agent."
-  (gnus-agent-load-alist group)
   (when articles
-    ;; Prune off articles that we have already fetched.
-    (while (and articles
-               (cdr (assq (car articles) gnus-agent-article-alist)))
-      (pop articles))
-    (let ((arts articles))
-      (while (cdr arts)
-       (if (cdr (assq (cadr arts) gnus-agent-article-alist))
-           (setcdr arts (cddr arts))
-         (setq arts (cdr arts)))))
-    (when articles
-      (let* ((fetched-articles (list nil))
-            (tail-fetched-articles fetched-articles)
-            (dir (concat
-                 (gnus-agent-directory)
-                 (gnus-agent-group-path group) "/"))
-           (date (time-to-days (current-time)))
-           (case-fold-search t)
-            pos crosses id)
-       (gnus-make-directory dir)
-       (gnus-message 7 "Fetching articles for %s..." group)
-       ;; Fetch the articles from the backend.
-       (if (gnus-check-backend-function 'retrieve-articles group)
-           (setq pos (gnus-retrieve-articles articles group))
-         (with-temp-buffer
-           (let (article)
-             (while (setq article (pop articles))
-               (gnus-message 10 "Fetching article %s for %s..."
-                             article group)
-               (when (or
-                      (gnus-backlog-request-article group article
-                                                    nntp-server-buffer)
-                      (gnus-request-article article group))
-                 (goto-char (point-max))
-                 (push (cons article (point)) pos)
-                 (insert-buffer-substring nntp-server-buffer)))
-             (copy-to-buffer nntp-server-buffer (point-min) (point-max))
-             (setq pos (nreverse pos)))))
-       ;; Then save these articles into the Agent.
-       (save-excursion
-         (set-buffer nntp-server-buffer)
-         (while pos
-           (narrow-to-region (cdar pos) (or (cdadr pos) (point-max)))
-           (goto-char (point-min))
-           (unless (eobp)  ;; Don't save empty articles.
-             (when (search-forward "\n\n" nil t)
-               (when (search-backward "\nXrefs: " nil t)
-                 ;; Handle cross posting.
-                  (goto-char (match-end 0)) ; move to end of header name
-                 (skip-chars-forward "^ ") ; skip server name
-                 (skip-chars-forward " ")
-                 (setq crosses nil)
-                 (while (looking-at "\\([^: \n]+\\):\\([0-9]+\\) *")
-                   (push (cons (buffer-substring (match-beginning 1)
-                                                 (match-end 1))
-                               (string-to-int (buffer-substring (match-beginning 2)
-                                                                 (match-end 2))))
-                         crosses)
-                   (goto-char (match-end 0)))
-                 (gnus-agent-crosspost crosses (caar pos) date)))
-             (goto-char (point-min))
-             (if (not (re-search-forward
-                       "^Message-ID: *<\\([^>\n]+\\)>" nil t))
-                 (setq id "No-Message-ID-in-article")
-               (setq id (buffer-substring (match-beginning 1) (match-end 1))))
-             (write-region-as-coding-system
-              gnus-agent-file-coding-system (point-min) (point-max)
-              (concat dir (number-to-string (caar pos))) nil 'silent)
-
-             (gnus-agent-append-to-list tail-fetched-articles (caar pos)))
-           (widen)
-           (pop pos)))
-
-       (gnus-agent-save-alist group (cdr fetched-articles) date)
-       (cdr fetched-articles)))))
+    (gnus-agent-load-alist group)
+    (let* ((alist   gnus-agent-article-alist)
+           (headers (if (< (length articles) 2) nil gnus-newsgroup-headers))
+           (selected-sets (list nil))
+           (current-set-size 0)
+           article
+           header-number)
+      ;; Check each article
+      (while (setq article (pop articles))
+        ;; Skip alist entries preceeding this article
+        (while (> article (or (caar alist) (1+ article)))
+          (setq alist (cdr alist)))
+
+        ;; Prune off articles that we have already fetched.
+        (unless (and (eq article (caar alist))
+                     (cdar alist))
+          ;; Skip headers preceeding this article
+          (while (> article 
+                    (setq header-number
+                          (let* ((header (car headers)))
+                            (if header
+                                (mail-header-number header)
+                              (1+ article)))))
+            (setq headers (cdr headers)))
+
+          ;; Add this article to the current set
+          (setcar selected-sets (cons article (car selected-sets)))
+
+          ;; Update the set size, when the set is too large start a
+          ;; new one.  I do this after adding the article as I want at
+          ;; least one article in each set.
+          (when (< gnus-agent-max-fetch-size
+                   (setq current-set-size (+ current-set-size (if (= header-number article)
+                                                                  (mail-header-chars (car headers))
+                                                                0))))
+            (setcar selected-sets (nreverse (car selected-sets)))
+            (setq selected-sets (cons nil selected-sets)
+                  current-set-size 0))))
+
+      (when (or (cdr selected-sets) (car selected-sets))
+        (let* ((fetched-articles (list nil))
+               (tail-fetched-articles fetched-articles)
+               (dir (concat
+                     (gnus-agent-directory)
+                     (gnus-agent-group-path group) "/"))
+               (date (time-to-days (current-time)))
+               (case-fold-search t)
+               pos crosses id)
+
+          (setcar selected-sets (nreverse (car selected-sets)))
+          (setq selected-sets (nreverse selected-sets))
+
+          (gnus-make-directory dir)
+          (gnus-message 7 "Fetching articles for %s..." group)
+          
+          (unwind-protect
+              (while (setq articles (pop selected-sets))
+                ;; Fetch the articles from the backend.
+                (if (gnus-check-backend-function 'retrieve-articles group)
+                    (setq pos (gnus-retrieve-articles articles group))
+                  (with-temp-buffer
+                    (let (article)
+                      (while (setq article (pop articles))
+                        (gnus-message 10 "Fetching article %s for %s..."
+                                      article group)
+                        (when (or
+                               (gnus-backlog-request-article group article
+                                                             nntp-server-buffer)
+                               (gnus-request-article article group))
+                          (goto-char (point-max))
+                          (push (cons article (point)) pos)
+                          (insert-buffer-substring nntp-server-buffer)))
+                      (copy-to-buffer nntp-server-buffer (point-min) (point-max))
+                      (setq pos (nreverse pos)))))
+                ;; Then save these articles into the Agent.
+                (save-excursion
+                  (set-buffer nntp-server-buffer)
+                  (while pos
+                    (narrow-to-region (cdar pos) (or (cdadr pos) (point-max)))
+                    (goto-char (point-min))
+                    (unless (eobp) ;; Don't save empty articles.
+                      (when (search-forward "\n\n" nil t)
+                        (when (search-backward "\nXrefs: " nil t)
+                          ;; Handle cross posting.
+                          (goto-char (match-end 0)) ; move to end of header name
+                          (skip-chars-forward "^ ") ; skip server name
+                          (skip-chars-forward " ")
+                          (setq crosses nil)
+                          (while (looking-at "\\([^: \n]+\\):\\([0-9]+\\) *")
+                            (push (cons (buffer-substring (match-beginning 1)
+                                                          (match-end 1))
+                                        (string-to-int (buffer-substring (match-beginning 2)
+                                                                         (match-end 2))))
+                                  crosses)
+                            (goto-char (match-end 0)))
+                          (gnus-agent-crosspost crosses (caar pos) date)))
+                      (goto-char (point-min))
+                      (if (not (re-search-forward
+                                "^Message-ID: *<\\([^>\n]+\\)>" nil t))
+                          (setq id "No-Message-ID-in-article")
+                        (setq id (buffer-substring (match-beginning 1) (match-end 1))))
+                     (write-region-as-coding-system
+                      gnus-agent-file-coding-system (point-min) (point-max)
+                      (concat dir (number-to-string (caar pos))) nil 'silent)
+
+                      (gnus-agent-append-to-list tail-fetched-articles (caar pos)))
+                    (widen)
+                    (pop pos))))
+
+            (gnus-agent-save-alist group (cdr fetched-articles) date))
+          (cdr fetched-articles))))))
 
 (defun gnus-agent-crosspost (crosses article &optional date)
   (setq date (or date t))
@@ -1172,7 +1211,7 @@ article numbers will be returned."
       ;; interesting marks.  (We have to fetch articles with boring marks
       ;; because otherwise the agent will remove their marks.)
       (dolist (arts (gnus-info-marks (gnus-get-info group)))
-        (unless (memq (car arts) '(seen recent))
+        (unless (memq (car arts) '(seen recent killed cache))
           (setq articles (gnus-range-add articles (cdr arts)))))
       (setq articles (sort (gnus-uncompress-sequence articles) '<)))
 
@@ -1471,31 +1510,42 @@ of FILE placing the combined headers in nntp-server-buffer."
   "Fetch GROUP."
   (let ((gnus-command-method method)
        (gnus-newsgroup-name group)
-       gnus-newsgroup-dependencies gnus-newsgroup-headers
-       gnus-newsgroup-scored gnus-headers gnus-score
-       gnus-use-cache articles arts
-       category predicate info marks score-param
+       (gnus-newsgroup-dependencies gnus-newsgroup-dependencies)
+        (gnus-newsgroup-headers gnus-newsgroup-headers)
+       (gnus-newsgroup-scored gnus-newsgroup-scored)
+       (gnus-use-cache gnus-use-cache)
        (gnus-summary-expunge-below gnus-summary-expunge-below)
        (gnus-summary-mark-below gnus-summary-mark-below)
        (gnus-orphan-score gnus-orphan-score)
        ;; Maybe some other gnus-summary local variables should also
        ;; be put here.
+
+        gnus-headers
+        gnus-score
+        articles arts
+       category predicate info marks score-param
        )
     (unless (gnus-check-group group)
       (error "Can't open server for %s" group))
 
     ;; Fetch headers.
-    (when (or (gnus-active group)
+    (when (or gnus-newsgroup-active
+              (gnus-active group)
               (gnus-activate-group group))
-      (let ((marked-articles nil))
+      (let ((marked-articles gnus-newsgroup-downloadable))
         ;; Identify the articles marked for download
-        (dolist (mark gnus-agent-download-marks)
-          (let ((arts (cdr (assq mark (gnus-info-marks
-                                       (setq info (gnus-get-info group)))))))
-            (when arts
-              (setq marked-articles (nconc (gnus-uncompress-range arts)
-                                           marked-articles))
-              )))
+        (unless gnus-newsgroup-active ;; This needs to be a
+          ;; gnus-summary local variable
+          ;; that is NOT bound to any
+          ;; value above (It's global
+          ;; value should default to nil).
+          (dolist (mark gnus-agent-download-marks)
+            (let ((arts (cdr (assq mark (gnus-info-marks
+                                         (setq info (gnus-get-info group)))))))
+              (when arts
+                (setq marked-articles (nconc (gnus-uncompress-range arts)
+                                             marked-articles))
+                ))))
         (setq marked-articles (sort marked-articles '<))
 
         ;; Fetch any new articles from the server
@@ -1507,11 +1557,13 @@ of FILE placing the combined headers in nntp-server-buffer."
         (when articles
           ;; Parse them and see which articles we want to fetch.
           (setq gnus-newsgroup-dependencies
-                (make-vector (length articles) 0))
+                (or gnus-newsgroup-dependencies
+                    (make-vector (length articles) 0)))
 
           (setq gnus-newsgroup-headers
-                (gnus-get-newsgroup-headers-xover articles nil nil
-                                                  group))
+                (or gnus-newsgroup-headers
+                    (gnus-get-newsgroup-headers-xover articles nil nil
+                                                      group)))
           ;; `gnus-agent-overview-buffer' may be killed for
           ;; timeout reason.  If so, recreate it.
           (gnus-agent-create-buffer)
@@ -1544,64 +1596,75 @@ of FILE placing the combined headers in nntp-server-buffer."
                        (not marked-articles))
             (let* ((arts (list nil))
                    (arts-tail arts)
+                   (alist (gnus-agent-load-alist group))
                    (chunk-size 0)
                    (marked-articles marked-articles)
-                   is-marked)
+                   fetched-articles)
               (while (setq gnus-headers (pop gnus-newsgroup-headers))
                 (let ((num (mail-header-number gnus-headers)))
-                  ;; Determine if this article was marked for download.
-                  (while (and marked-articles
-                              (cond ((< num (car marked-articles))
-                                     nil)
-                                    ((= num (car marked-articles))
-                                     (setq is-marked t)
-                                     nil)
-                                    (t
-                                     (setq marked-articles
-                                           (cdr marked-articles))))))
-
-                  ;; When this article is marked, or selected by the
-                  ;; predicate, add it to the download list
-                  (when (or is-marked
-                            (let ((gnus-score
-                                   (or (cdr (assq num gnus-newsgroup-scored))
-                                       gnus-summary-default-score)))
-                              (funcall predicate)))
-                    (gnus-agent-append-to-list arts-tail num)
-
-                    ;; When the expected size of the fetched articles
-                    ;; exceeds gnus-agent-max-fetch-size, perform the
-                    ;; fetch.
-                    (when (< gnus-agent-max-fetch-size
-                             (setq chunk-size
-                                   (+ chunk-size
-                                      (mail-header-chars gnus-headers))))
-                      (gnus-agent-fetch-articles group (cdr arts))
-                      (setcdr arts nil)
-                      (setq arts-tail arts)
-                      (setq chunk-size 0)))))
-
-              ;; Fetch all remaining articles
+                  ;; Determine if this article is already in the cache
+                  (while (and alist
+                              (> num (caar alist)))
+                    (setq alist (cdr alist)))
+
+                  (unless (and (eq num (caar alist))
+                               (cdar alist))
+
+                    ;; Determine if this article was marked for download.
+                    (while (and marked-articles
+                                (> num (car marked-articles)))
+                      (setq marked-articles
+                            (cdr marked-articles)))
+
+                    ;; When this article is marked, or selected by the
+                    ;; predicate, add it to the download list
+                    (when (or (eq num (car marked-articles))
+                              (let ((gnus-score
+                                     (or (cdr (assq num gnus-newsgroup-scored))
+                                         gnus-summary-default-score)))
+                                (funcall predicate)))
+                      (gnus-agent-append-to-list arts-tail num)))))
+
+              ;; Fetch all selected articles
               (when (cdr arts)
-                (gnus-agent-fetch-articles group (cdr arts)))))
-
-          ;; When some, or all, of the marked articles came
-          ;; from the download mark.  Remove that mark.  I
-          ;; didn't do this earlier as I only want to remove
-          ;; the marks after the fetch is completed.
-
-          (when marked-articles
-            (dolist (mark gnus-agent-download-marks)
-              (when (eq mark 'download)
-                (setq arts (assq mark (gnus-info-marks
-                                       (setq info (gnus-get-info group)))))
-                (when (cdr arts)
-                  (setq marks (delq arts (gnus-info-marks info)))
-                  (gnus-info-set-marks info marks)
-                  (gnus-dribble-enter
-                   (concat "(gnus-group-set-info '"
-                           (gnus-prin1-to-string info)
-                           ")")))))))))))
+                (setq gnus-newsgroup-undownloaded
+                      (gnus-sorted-ndifference gnus-newsgroup-undownloaded
+                                               (setq fetched-articles (gnus-agent-fetch-articles group (cdr arts)))))
+                (if gnus-newsgroup-active
+                    (progn
+                      (dolist (article (cdr arts))
+                        (setq gnus-newsgroup-downloadable
+                              (delq article gnus-newsgroup-downloadable))
+                        (when (gnus-summary-goto-subject article nil t)
+                          (gnus-summary-update-download-mark article)))
+                      (dolist (article fetched-articles)
+                        (if gnus-agent-mark-unread-after-downloaded
+                            (gnus-summary-mark-article article gnus-unread-mark))))
+                  ;; When some, or all, of the marked articles came
+                  ;; from the download mark.  Remove that mark.  I
+                  ;; didn't do this earlier as I only want to remove
+                  ;; the marks after the fetch is completed.
+
+                  (when (cdr arts)
+                    (dolist (mark gnus-agent-download-marks)
+                      (when (eq mark 'download)
+                        (let ((marked-arts (assq mark (gnus-info-marks
+                                                       (setq info (gnus-get-info group))))))
+                          (when (cdr marked-arts)
+                            (setq marks (delq marked-arts (gnus-info-marks info)))
+                            (gnus-info-set-marks info marks)
+                            ))))
+                    (let ((unfetched-articles (gnus-sorted-ndifference (cdr arts) fetched-articles))
+                          (read (gnus-info-read (or info (setq info (gnus-get-info group))))))
+                      (gnus-info-set-read info (gnus-add-to-range read unfetched-articles)))
+
+                    (gnus-group-update-group group t)
+                    (sit-for 0)
+
+                    (gnus-dribble-enter
+                     (concat "(gnus-group-set-info '"
+                             (gnus-prin1-to-string info)
+                             ")"))))))))))))
 
 ;;;
 ;;; Agent Category Mode
index 335ff60..ce48376 100644 (file)
@@ -1380,7 +1380,12 @@ buffers. For example:
 ")
 
 ;; Byte-compiler warning.
-(eval-when-compile (defvar gnus-article-mode-map))
+;(eval-when-compile (defvar gnus-article-mode-map))
+(eval-when-compile
+  (let ((features (cons 'gnus-sum features)))
+    (require 'gnus)
+    (require 'gnus-agent)
+    (require 'gnus-art)))
 
 ;; Subject simplification.
 
@@ -3094,7 +3099,7 @@ buffer that was in action when the last article was fetched."
     (let ((gnus-replied-mark 129)
          (gnus-score-below-mark 130)
          (gnus-score-over-mark 130)
-         (gnus-downloaded-mark 131)
+         (gnus-undownloaded-mark 131)
          (spec gnus-summary-line-format-spec)
          gnus-visual pos)
       (save-excursion
@@ -3105,7 +3110,7 @@ buffer that was in action when the last article was fetched."
           (make-full-mail-header 0 "" "nobody"
                                  "05 Apr 2001 23:33:09 +0400"
                                  "" "" 0 0 "" nil)
-          0 nil nil 128 t nil "" nil 1)
+          0 nil t 128 t nil "" nil 1)
          (goto-char (point-min))
          (setq pos (list (cons 'unread (and (search-forward "\200" nil t)
                                             (- (point) (point-min) 1)))))
index f36059b..a4456af 100644 (file)
@@ -1504,21 +1504,22 @@ find-file-hooks, etc.
 (defun nnheader-insert-nov-file (file first)
   (let ((size (nth 7 (file-attributes file)))
        (cutoff (* 32 1024)))
-    (if (< size cutoff)
-       ;; If the file is small, we just load it.
-       (nnheader-insert-file-contents file)
-      ;; We start on the assumption that FIRST is pretty recent.  If
-      ;; not, we just insert the rest of the file as well.
-      (let (current)
-       (nnheader-insert-file-contents file nil (- size cutoff) size)
-       (goto-char (point-min))
-       (delete-region (point) (or (search-forward "\n" nil 'move) (point)))
-       (setq current (ignore-errors (read (current-buffer))))
-       (if (and (numberp current)
-                (< current first))
-           t
-         (delete-region (point-min) (point-max))
-         (nnheader-insert-file-contents file))))))
+    (when size
+      (if (< size cutoff)
+          ;; If the file is small, we just load it.
+          (nnheader-insert-file-contents file)
+        ;; We start on the assumption that FIRST is pretty recent.  If
+        ;; not, we just insert the rest of the file as well.
+        (let (current)
+          (nnheader-insert-file-contents file nil (- size cutoff) size)
+          (goto-char (point-min))
+          (delete-region (point) (or (search-forward "\n" nil 'move) (point)))
+          (setq current (ignore-errors (read (current-buffer))))
+          (if (and (numberp current)
+                   (< current first))
+              t
+            (delete-region (point-min) (point-max))
+            (nnheader-insert-file-contents file)))))))
 
 (defun nnheader-find-file-noselect (&rest args)
   (let ((format-alist nil)
index 912a82b..5a46da1 100644 (file)
@@ -294,7 +294,9 @@ noticing asynchronous data.")
        nntp-last-command string)
   (when nntp-record-commands
     (nntp-record-command string))
-  (process-send-string process (concat string nntp-end-of-line)))
+  (process-send-string process (concat string nntp-end-of-line))
+  (or (memq (process-status process) '(open run))
+      (nntp-report "Server closed connection")))
 
 (defun nntp-record-command (string)
   "Record the command STRING."
@@ -306,6 +308,25 @@ noticing asynchronous data.")
              "." (format "%03d" (/ (nth 2 time) 1000))
              " " nntp-address " " string "\n"))))
 
+(defun nntp-report (&rest args)
+  "Report an error from the nntp backend.  The first string in ARGS
+can be a format string.  For some commands, the failed command may be
+retried once before actually displaying the error report."
+
+  (when nntp-record-commands
+    (nntp-record-command "*** CALLED nntp-report ***"))
+
+  (nnheader-report 'nntp args))
+
+(defun nntp-report-1 (&rest args)
+  "Throws out to nntp-with-open-group-error so that the connection may
+be restored and the command retried."
+
+  (when nntp-record-commands
+    (nntp-record-command "*** CONNECTION LOST ***"))
+
+  (throw 'nntp-with-open-group-error t))
+
 (defsubst nntp-wait-for (process wait-for buffer &optional decode discard)
   "Wait for WAIT-FOR to arrive from PROCESS."
   (save-excursion
@@ -391,32 +412,33 @@ noticing asynchronous data.")
   "Use COMMAND to retrieve data into BUFFER from PORT on ADDRESS."
   (let ((process (or (nntp-find-connection buffer)
                     (nntp-open-connection buffer))))
-    (if (not process)
-       (nnheader-report 'nntp "Couldn't open connection to %s" address)
-      (unless (or nntp-inhibit-erase nnheader-callback-function)
-       (save-excursion
-         (set-buffer (process-buffer process))
-         (erase-buffer)))
-      (condition-case err
-         (progn
-           (when command
-             (nntp-send-string process command))
-           (cond
-            ((eq callback 'ignore)
-             t)
-            ((and callback wait-for)
-             (nntp-async-wait process wait-for buffer decode callback)
-             t)
-            (wait-for
-             (nntp-wait-for process wait-for buffer decode))
-            (t t)))
-       (error
-        (nnheader-report 'nntp "Couldn't open connection to %s: %s"
-                         address err))
-       (quit
-        (message "Quit retrieving data from nntp")
-        (signal 'quit nil)
-        nil)))))
+    (if process
+        (progn
+          (unless (or nntp-inhibit-erase nnheader-callback-function)
+            (save-excursion
+              (set-buffer (process-buffer process))
+              (erase-buffer)))
+          (condition-case err
+              (progn
+                (when command
+                  (nntp-send-string process command))
+                (cond
+                 ((eq callback 'ignore)
+                  t)
+                 ((and callback wait-for)
+                  (nntp-async-wait process wait-for buffer decode callback)
+                  t)
+                 (wait-for
+                  (nntp-wait-for process wait-for buffer decode))
+                 (t t)))
+            (error
+             (nnheader-report 'nntp "Couldn't open connection to %s: %s"
+                              address err))
+            (quit
+             (message "Quit retrieving data from nntp")
+             (signal 'quit nil)
+             nil)))
+      (nnheader-report 'nntp "Couldn't open connection to %s" address))))
 
 (defsubst nntp-send-command (wait-for &rest strings)
   "Send STRINGS to server and wait until WAIT-FOR returns."
@@ -552,7 +574,9 @@ noticing asynchronous data.")
    (t
     nil)))
 
-(defvar nntp-with-open-group-first-pass nil)
+(eval-when-compile
+  (defvar nntp-with-open-group-internal nil)
+  (defvar nntp-report-n nil))
 
 (defmacro nntp-with-open-group (group server &optional connectionless &rest forms)
   "Protect against servers that don't like clients that keep idle connections opens.
@@ -565,209 +589,210 @@ 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."
   (when (and (listp connectionless)
-             (not (eq connectionless nil)))
+            (not (eq connectionless nil)))
     (setq forms (cons connectionless forms)
-          connectionless nil))
-  `(let ((nntp-with-open-group-first-pass t)
-         nntp-with-open-group-internal)
-     (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
-                  (nnheader-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 (progn ,@forms))
-              (when timer
-                (nnheader-cancel-timer timer)))
-            nil))
-       (setq nntp-with-open-group-first-pass nil))
+         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
+                         (nnheader-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
+                             (progn ,@forms)
+                           (quit
+                            (nntp-close-server))))
+                 (when timer
+                   (nnheader-cancel-timer timer)))
+               nil))
+       (setf (symbol-function 'nntp-report) nntp-report-n))
      nntp-with-open-group-internal))
 
-(defsubst nntp-report (&rest args)
-  "Report an error from the nntp backend.
-The first string in ARGS can be a format string.
-For some commands, the failed command may be retried once before actually displaying the error report."
-
-  (if nntp-with-open-group-first-pass
-      (throw 'nntp-with-open-group-error t))
-
-  (nnheader-report 'nntp args)
-  )
-
 (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))
-      (erase-buffer)
-      (if (and (not gnus-nov-is-evil)
-               (not nntp-nov-is-evil)
-               (nntp-retrieve-headers-with-xover articles fetch-old))
-          ;; We successfully retrieved the headers via XOVER.
-          'nov
-        ;; XOVER didn't work, so we do it the hard, slow and inefficient
-        ;; way.
-        (let ((number (length articles))
-              (count 0)
-              (received 0)
-              (last-point (point-min))
-              (buf (nntp-find-connection-buffer nntp-server-buffer))
-              (nntp-inhibit-erase t)
-              article)
-          ;; Send HEAD commands.
-          (while (setq article (pop articles))
-            (nntp-send-command
-             nil
-             "HEAD" (if (numberp article)
-                        (int-to-string article)
-                      ;; `articles' is either a list of article numbers
-                      ;; or a list of article IDs.
-                      article))
-            (incf count)
-            ;; Every 400 requests we have to read the stream in
-            ;; order to avoid deadlocks.
-            (when (or (null articles)   ;All requests have been sent.
-                      (zerop (% count nntp-maximum-request)))
-              (nntp-accept-response)
-              (while (progn
-                       (set-buffer buf)
-                       (goto-char last-point)
-                       ;; Count replies.
-                       (while (nntp-next-result-arrived-p)
-                         (setq last-point (point))
-                         (incf received))
-                       (< received count))
-                ;; If number of headers is greater than 100, give
-                ;;  informative messages.
-                (and (numberp nntp-large-newsgroup)
-                     (> number nntp-large-newsgroup)
-                     (zerop (% received 20))
-                     (nnheader-message 6 "NNTP: Receiving headers... %d%%"
-                                       (/ (* received 100) number)))
-                (nntp-accept-response))))
-          (and (numberp nntp-large-newsgroup)
-               (> number nntp-large-newsgroup)
-               (nnheader-message 6 "NNTP: Receiving headers...done"))
-
-          ;; Now all of replies are received.  Fold continuation lines.
-          (nnheader-fold-continuation-lines)
-          ;; Remove all "\r"'s.
-          (nnheader-strip-cr)
-          (copy-to-buffer nntp-server-buffer (point-min) (point-max))
-          'headers)))))
+   group server
+   (save-excursion
+     (set-buffer (nntp-find-connection-buffer nntp-server-buffer))
+     (erase-buffer)
+     (if (and (not gnus-nov-is-evil)
+              (not nntp-nov-is-evil)
+              (nntp-retrieve-headers-with-xover articles fetch-old))
+         ;; We successfully retrieved the headers via XOVER.
+         'nov
+       ;; XOVER didn't work, so we do it the hard, slow and inefficient
+       ;; way.
+       (let ((number (length articles))
+             (articles articles)
+             (count 0)
+             (received 0)
+             (last-point (point-min))
+             (buf (nntp-find-connection-buffer nntp-server-buffer))
+             (nntp-inhibit-erase t)
+             article)
+         ;; Send HEAD commands.
+         (while (setq article (pop articles))
+           (nntp-send-command
+            nil
+            "HEAD" (if (numberp article)
+                       (int-to-string article)
+                     ;; `articles' is either a list of article numbers
+                     ;; or a list of article IDs.
+                     article))
+           (incf count)
+           ;; Every 400 requests we have to read the stream in
+           ;; order to avoid deadlocks.
+           (when (or (null articles)    ;All requests have been sent.
+                     (zerop (% count nntp-maximum-request)))
+             (nntp-accept-response)
+             (while (progn
+                      (set-buffer buf)
+                      (goto-char last-point)
+                      ;; Count replies.
+                      (while (nntp-next-result-arrived-p)
+                        (setq last-point (point))
+                        (incf received))
+                      (< received count))
+               ;; If number of headers is greater than 100, give
+               ;;  informative messages.
+               (and (numberp nntp-large-newsgroup)
+                    (> number nntp-large-newsgroup)
+                    (zerop (% received 20))
+                    (nnheader-message 6 "NNTP: Receiving headers... %d%%"
+                                      (/ (* received 100) number)))
+               (nntp-accept-response))))
+         (and (numberp nntp-large-newsgroup)
+              (> number nntp-large-newsgroup)
+              (nnheader-message 6 "NNTP: Receiving headers...done"))
+
+         ;; Now all of replies are received.  Fold continuation lines.
+         (nnheader-fold-continuation-lines)
+         ;; Remove all "\r"'s.
+         (nnheader-strip-cr)
+         (copy-to-buffer nntp-server-buffer (point-min) (point-max))
+         'headers)))))
 
 (deffoo nntp-retrieve-groups (groups &optional server)
   "Retrieve group info on GROUPS."
-  (nntp-possibly-change-group nil server)
-  (when (nntp-find-connection-buffer nntp-server-buffer)
-    (catch 'done
-      (save-excursion
-       ;; Erase nntp-server-buffer before nntp-inhibit-erase.
-       (set-buffer nntp-server-buffer)
-       (erase-buffer)
-       (set-buffer (nntp-find-connection-buffer nntp-server-buffer))
-       ;; The first time this is run, this variable is `try'.  So we
-       ;; try.
-       (when (eq nntp-server-list-active-group 'try)
-         (nntp-try-list-active (car groups)))
-       (erase-buffer)
-       (let ((count 0)
-             (received 0)
-             (last-point (point-min))
-             (nntp-inhibit-erase t)
-             (buf (nntp-find-connection-buffer nntp-server-buffer))
-             (command (if nntp-server-list-active-group
-                          "LIST ACTIVE" "GROUP")))
-         (while groups
-           ;; Timeout may have killed the buffer.
-           (unless (gnus-buffer-live-p buf)
-             (nnheader-report 'nntp "Connection to %s is closed." server)
-             (throw 'done nil))
-           ;; Send the command to the server.
-           (nntp-send-command nil command (pop groups))
-           (incf count)
-           ;; Every 400 requests we have to read the stream in
-           ;; order to avoid deadlocks.
-           (when (or (null groups)     ;All requests have been sent.
-                     (zerop (% count nntp-maximum-request)))
-             (nntp-accept-response)
-             (while (and (gnus-buffer-live-p buf)
-                         (progn
-                           ;; Search `blue moon' in this file for the
-                           ;; reason why set-buffer here.
-                           (set-buffer buf)
-                           (goto-char last-point)
-                           ;; Count replies.
-                           (while (re-search-forward "^[0-9]" nil t)
-                             (incf received))
-                           (setq last-point (point))
-                           (< received count)))
-               (nntp-accept-response))))
-
-         ;; Wait for the reply from the final command.
-         (unless (gnus-buffer-live-p buf)
-           (nnheader-report 'nntp "Connection to %s is closed." server)
-           (throw 'done nil))
-         (set-buffer buf)
-         (goto-char (point-max))
-         (re-search-backward "^[0-9]" nil t)
-         (when (looking-at "^[23]")
-           (while (and (gnus-buffer-live-p buf)
-                       (progn
-                         (set-buffer buf)
-                         (goto-char (point-max))
-                         (if (not nntp-server-list-active-group)
-                             (not (re-search-backward "\r?\n" (- (point) 3) t))
-                           (not (re-search-backward "^\\.\r?\n"
-                                                    (- (point) 4) t)))))
-             (nntp-accept-response)))
-
-         ;; Now all replies are received.  We remove CRs.
-         (unless (gnus-buffer-live-p buf)
-           (nnheader-report 'nntp "Connection to %s is closed." server)
-           (throw 'done nil))
-         (set-buffer buf)
-         (goto-char (point-min))
-         (while (search-forward "\r" nil t)
-           (replace-match "" t t))
-
-         (if (not nntp-server-list-active-group)
-             (progn
-               (copy-to-buffer nntp-server-buffer (point-min) (point-max))
-               'group)
-           ;; We have read active entries, so we just delete the
-           ;; superfluous gunk.
-           (goto-char (point-min))
-           (while (re-search-forward "^[.2-5]" nil t)
-             (delete-region (match-beginning 0)
-                            (progn (forward-line 1) (point))))
-           (copy-to-buffer nntp-server-buffer (point-min) (point-max))
-           'active))))))
+  (nntp-with-open-group
+   nil server
+   (when (nntp-find-connection-buffer nntp-server-buffer)
+     (catch 'done
+       (save-excursion
+         ;; Erase nntp-server-buffer before nntp-inhibit-erase.
+         (set-buffer nntp-server-buffer)
+         (erase-buffer)
+         (set-buffer (nntp-find-connection-buffer nntp-server-buffer))
+         ;; The first time this is run, this variable is `try'.  So we
+         ;; try.
+         (when (eq nntp-server-list-active-group 'try)
+           (nntp-try-list-active (car groups)))
+         (erase-buffer)
+         (let ((count 0)
+               (groups groups)
+               (received 0)
+               (last-point (point-min))
+               (nntp-inhibit-erase t)
+               (buf (nntp-find-connection-buffer nntp-server-buffer))
+               (command (if nntp-server-list-active-group
+                            "LIST ACTIVE" "GROUP")))
+           (while groups
+             ;; Timeout may have killed the buffer.
+             (unless (gnus-buffer-live-p buf)
+               (nnheader-report 'nntp "Connection to %s is closed." server)
+               (throw 'done nil))
+             ;; Send the command to the server.
+             (nntp-send-command nil command (pop groups))
+             (incf count)
+             ;; Every 400 requests we have to read the stream in
+             ;; order to avoid deadlocks.
+             (when (or (null groups)    ;All requests have been sent.
+                       (zerop (% count nntp-maximum-request)))
+               (nntp-accept-response)
+               (while (and (gnus-buffer-live-p buf)
+                           (progn
+                             ;; Search `blue moon' in this file for the
+                             ;; reason why set-buffer here.
+                             (set-buffer buf)
+                             (goto-char last-point)
+                             ;; Count replies.
+                             (while (re-search-forward "^[0-9]" nil t)
+                               (incf received))
+                             (setq last-point (point))
+                             (< received count)))
+                 (nntp-accept-response))))
+
+           ;; Wait for the reply from the final command.
+           (unless (gnus-buffer-live-p buf)
+             (nnheader-report 'nntp "Connection to %s is closed." server)
+             (throw 'done nil))
+           (set-buffer buf)
+           (goto-char (point-max))
+           (re-search-backward "^[0-9]" nil t)
+           (when (looking-at "^[23]")
+             (while (and (gnus-buffer-live-p buf)
+                         (progn
+                           (set-buffer buf)
+                           (goto-char (point-max))
+                           (if (not nntp-server-list-active-group)
+                               (not (re-search-backward "\r?\n" (- (point) 3) t))
+                             (not (re-search-backward "^\\.\r?\n"
+                                                      (- (point) 4) t)))))
+               (nntp-accept-response)))
+
+           ;; Now all replies are received.  We remove CRs.
+           (unless (gnus-buffer-live-p buf)
+             (nnheader-report 'nntp "Connection to %s is closed." server)
+             (throw 'done nil))
+           (set-buffer buf)
+           (goto-char (point-min))
+           (while (search-forward "\r" nil t)
+             (replace-match "" t t))
+
+           (if (not nntp-server-list-active-group)
+               (progn
+                 (copy-to-buffer nntp-server-buffer (point-min) (point-max))
+                 'group)
+             ;; We have read active entries, so we just delete the
+             ;; superfluous gunk.
+             (goto-char (point-min))
+             (while (re-search-forward "^[.2-5]" nil t)
+               (delete-region (match-beginning 0)
+                              (progn (forward-line 1) (point))))
+             (copy-to-buffer nntp-server-buffer (point-min) (point-max))
+             'active)))))))
 
 (deffoo nntp-retrieve-articles (articles &optional group server)
-  (nntp-with-open-group 
+  (nntp-with-open-group
     group server
    (save-excursion
      (let ((number (length articles))
+           (articles articles)
            (count 0)
            (received 0)
            (last-point (point-min))
@@ -845,16 +870,18 @@ For some commands, the failed command may be retried once before actually displa
 
 (deffoo nntp-list-active-group (group &optional server)
   "Return the active info on GROUP (which can be a regexp)."
-  (nntp-possibly-change-group nil server)
-  (nntp-send-command "^\\.*\r?\n" "LIST ACTIVE" group))
+  (nntp-with-open-group
+   nil server
+   (nntp-send-command "^\\.*\r?\n" "LIST ACTIVE" group)))
 
 (deffoo nntp-request-group-articles (group &optional server)
   "Return the list of existing articles in GROUP."
-  (nntp-possibly-change-group nil server)
-  (nntp-send-command "^\\.*\r?\n" "LISTGROUP" group))
+  (nntp-with-open-group
+   nil server
+   (nntp-send-command "^\\.*\r?\n" "LISTGROUP" group)))
 
 (deffoo nntp-request-article (article &optional group server buffer command)
-  (nntp-with-open-group 
+  (nntp-with-open-group
     group server
     (when (nntp-send-command-and-decode
            "\r?\n\\.\r?\n" "ARTICLE"
@@ -868,19 +895,21 @@ For some commands, the failed command may be retried once before actually displa
         (nntp-find-group-and-number group)))))
 
 (deffoo nntp-request-head (article &optional group server)
-  (nntp-possibly-change-group group server)
-  (when (nntp-send-command
-        "\r?\n\\.\r?\n" "HEAD"
-        (if (numberp article) (int-to-string article) article))
-    (prog1
-       (nntp-find-group-and-number group)
-      (nntp-decode-text))))
+  (nntp-with-open-group
+   group server
+   (when (nntp-send-command
+          "\r?\n\\.\r?\n" "HEAD"
+          (if (numberp article) (int-to-string article) article))
+     (prog1
+         (nntp-find-group-and-number group)
+       (nntp-decode-text)))))
 
 (deffoo nntp-request-body (article &optional group server)
-  (nntp-possibly-change-group group server)
-  (nntp-send-command-and-decode
-   "\r?\n\\.\r?\n" "BODY"
-   (if (numberp article) (int-to-string article) article)))
+  (nntp-with-open-group
+   group server
+   (nntp-send-command-and-decode
+    "\r?\n\\.\r?\n" "BODY"
+    (if (numberp article) (int-to-string article) article))))
 
 (deffoo nntp-request-group (group &optional server dont-check)
   (nntp-with-open-group 
@@ -950,81 +979,85 @@ output from the server will be restricted to the specified newsgroups.
 If `nntp-options-subscribe' is non-nil, remove newsgroups that do not
 match the regexp.  If `nntp-options-not-subscribe' is non-nil, remove
 newsgroups that match the regexp."
-  (nntp-possibly-change-group nil server)
-  (with-current-buffer nntp-server-buffer
-    (prog1
-       (if (not nntp-list-options)
-           (nntp-send-command-and-decode "\r?\n\\.\r?\n" "LIST")
-         (let ((options (if (consp nntp-list-options)
-                            nntp-list-options
-                          (list nntp-list-options)))
-               (ret t))
-           (erase-buffer)
-           (while options
-             (goto-char (point-max))
-             (narrow-to-region (point) (point))
-             (setq ret (and ret
-                            (nntp-send-command-nodelete
-                             "\r?\n\\.\r?\n"
-                             (format "LIST ACTIVE %s" (car options))))
-                   options (cdr options))
-             (nntp-decode-text))
-           (widen)
-           ret))
-      (when (and (stringp nntp-options-subscribe)
-                (not (string-equal "" nntp-options-subscribe)))
-       (goto-char (point-min))
-       (keep-lines nntp-options-subscribe))
-      (when (and (stringp nntp-options-not-subscribe)
-                (not (string-equal "" nntp-options-not-subscribe)))
-       (goto-char (point-min))
-       (flush-lines nntp-options-subscribe)))))
+  (nntp-with-open-group
+   nil server
+   (with-current-buffer nntp-server-buffer
+     (prog1
+        (if (not nntp-list-options)
+            (nntp-send-command-and-decode "\r?\n\\.\r?\n" "LIST")
+          (let ((options (if (consp nntp-list-options)
+                             nntp-list-options
+                           (list nntp-list-options)))
+                (ret t))
+            (erase-buffer)
+            (while options
+              (goto-char (point-max))
+              (narrow-to-region (point) (point))
+              (setq ret (and ret
+                             (nntp-send-command-nodelete
+                              "\r?\n\\.\r?\n"
+                              (format "LIST ACTIVE %s" (car options))))
+                    options (cdr options))
+              (nntp-decode-text))
+            (widen)
+            ret))
+       (when (and (stringp nntp-options-subscribe)
+                 (not (string-equal "" nntp-options-subscribe)))
+        (goto-char (point-min))
+        (keep-lines nntp-options-subscribe))
+       (when (and (stringp nntp-options-not-subscribe)
+                 (not (string-equal "" nntp-options-not-subscribe)))
+        (goto-char (point-min))
+        (flush-lines nntp-options-subscribe))))))
 
 (deffoo nntp-request-list-newsgroups (&optional server)
-  (nntp-possibly-change-group nil server)
-  (nntp-send-command "\r?\n\\.\r?\n" "LIST NEWSGROUPS"))
+  (nntp-with-open-group
+   nil server
+   (nntp-send-command "\r?\n\\.\r?\n" "LIST NEWSGROUPS")))
 
 (deffoo nntp-request-newgroups (date &optional server)
-  (nntp-possibly-change-group nil server)
-  (save-excursion
-    (set-buffer nntp-server-buffer)
-    (let* ((time (date-to-time date))
-          (ls (- (cadr time) (nth 8 (decode-time time)))))
-      (cond ((< ls 0)
-            (setcar time (1- (car time)))
-            (setcar (cdr time) (+ ls 65536)))
-           ((>= ls 65536)
-            (setcar time (1+ (car time)))
-            (setcar (cdr time) (- ls 65536)))
-           (t
-            (setcar (cdr time) ls)))
-      (prog1
-         (nntp-send-command
-          "^\\.\r?\n" "NEWGROUPS"
-          (format-time-string "%y%m%d %H%M%S" time)
-          "GMT")
-       (nntp-decode-text)))))
+  (nntp-with-open-group
+   nil server
+   (save-excursion
+     (set-buffer nntp-server-buffer)
+     (let* ((time (date-to-time date))
+           (ls (- (cadr time) (nth 8 (decode-time time)))))
+       (cond ((< ls 0)
+             (setcar time (1- (car time)))
+             (setcar (cdr time) (+ ls 65536)))
+            ((>= ls 65536)
+             (setcar time (1+ (car time)))
+             (setcar (cdr time) (- ls 65536)))
+            (t
+             (setcar (cdr time) ls)))
+       (prog1
+          (nntp-send-command
+           "^\\.\r?\n" "NEWGROUPS"
+           (format-time-string "%y%m%d %H%M%S" time)
+           "GMT")
+        (nntp-decode-text))))))
 
 (deffoo nntp-request-post (&optional server)
-  (nntp-possibly-change-group nil server)
-  (when (nntp-send-command "^[23].*\r?\n" "POST")
-    (let ((response (with-current-buffer nntp-server-buffer
-                     nntp-process-response))
-         server-id)
-      (when (and response
-                (string-match "^[23].*\\(<[^\t\n @<>]+@[^\t\n @<>]+>\\)"
-                              response))
-       (setq server-id (match-string 1 response))
-       (narrow-to-region (goto-char (point-min))
-                         (if (search-forward "\n\n" nil t)
-                             (1- (point))
-                           (point-max)))
-       (unless (mail-fetch-field "Message-ID")
-         (goto-char (point-min))
-         (insert "Message-ID: " server-id "\n"))
-       (widen))
-      (run-hooks 'nntp-prepare-post-hook)
-      (nntp-send-buffer "^[23].*\n"))))
+  (nntp-with-open-group
+   nil server
+   (when (nntp-send-command "^[23].*\r?\n" "POST")
+     (let ((response (with-current-buffer nntp-server-buffer
+                      nntp-process-response))
+          server-id)
+       (when (and response
+                 (string-match "^[23].*\\(<[^\t\n @<>]+@[^\t\n @<>]+>\\)"
+                               response))
+        (setq server-id (match-string 1 response))
+        (narrow-to-region (goto-char (point-min))
+                          (if (search-forward "\n\n" nil t)
+                              (1- (point))
+                            (point-max)))
+        (unless (mail-fetch-field "Message-ID")
+          (goto-char (point-min))
+          (insert "Message-ID: " server-id "\n"))
+        (widen))
+       (run-hooks 'nntp-prepare-post-hook)
+       (nntp-send-buffer "^[23].*\n")))))
 
 (deffoo nntp-request-type (group article)
   'news)
@@ -1315,7 +1348,8 @@ password contained in '~/.nntp-authinfo'."
     ;; that the server has closed the connection.  This MUST be
     ;; handled here as the buffer restored by the save-excursion may
     ;; be the process's former output buffer (i.e. now killed)
-    (or (memq (process-status process) '(open run))
+    (or (not process)
+        (memq (process-status process) '(open run))
         (nntp-report "Server closed connection"))))
 
 (defun nntp-accept-response ()
@@ -1474,18 +1508,22 @@ password contained in '~/.nntp-authinfo'."
              (nntp-accept-response)
              (set-buffer process-buffer))))
 
-        ;; Some nntp servers seem to have an extension to the XOVER extension.  On these 
-        ;; servers, requesting an article range preceeding the active range does not return an 
-        ;; error as specified in the RFC.  What we instead get is the NOV entry for the first 
-        ;; available article.  Obviously, a client can use that entry to avoid making unnecessary 
-        ;; requests.  The only problem is for a client that assumes that the response will always be
-        ;; within the requested ranage.  For such a client, we can get N copies of the same entry
-        ;; (one for each XOVER command sent to the server).
+        ;; Some nntp servers seem to have an extension to the XOVER
+        ;; extension.  On these servers, requesting an article range
+        ;; preceeding the active range does not return an error as
+        ;; specified in the RFC.  What we instead get is the NOV entry
+        ;; for the first available article.  Obviously, a client can
+        ;; use that entry to avoid making unnecessary requests.  The
+        ;; only problem is for a client that assumes that the response
+        ;; will always be within the requested ranage.  For such a
+        ;; client, we can get N copies of the same entry (one for each
+        ;; XOVER command sent to the server).
 
         (when (<= count 1)
           (goto-char (point-min))
           (when (re-search-forward "^[0-9][0-9][0-9] .*\n\\([0-9]+\\)" nil t)
-            (let ((low-limit (string-to-int (buffer-substring (match-beginning 1) (match-end 1)))))
+            (let ((low-limit (string-to-int (buffer-substring (match-beginning 1) 
+                                                              (match-end 1)))))
               (while (and articles (<= (car articles) low-limit))
                 (setq articles (cdr articles))))))
         (set-buffer buf))
index cc9de25..6851313 100644 (file)
@@ -691,7 +691,7 @@ Article Treatment
 * Article Washing::             \e$B?M@8$r$b$C$H$h$/$9$k$?$/$5$s$N5$$NMx$$$?\e(B
                                 \e$B4X?t\e(B
 * Article Header::              \e$B%X%C%@!<$r$$$m$$$mJQ7A$5$;$k\e(B
-* Article Buttons::             URL \e$B$d\e(B Message-ID \e$B$d\e(B \e$B%"%I%l%9$J$I$r%/%j%C\e(B
+* Article Buttons::             URL \e$B$d\e(B Message-ID \e$B$d%"%I%l%9$J$I$r%/%j%C\e(B
                                 \e$B%/$9$k\e(B
 * Article Date::                \e$B$0$:$0$:8@$&$J!"@$3&;~$@\e(B!
 * Article Display::             X-Face, Picons, Smileys \e$B$rI=<($9$k\e(B
@@ -1373,8 +1373,8 @@ Gnus \e$B$O!"IaDL$O%0%k!<%W$,?7$7$$$+$I$&$+$r!"9XFI$7$F$$$k%0%k!<%W$H:o=|$5\e(B
 @table @code
 @item gnus-subscribe-zombies
 @vindex gnus-subscribe-zombies
-\e$B$9$Y$F$N?7$7$$%0%k!<%W$r%>%s%S\e(B (zombie) \e$B$K$7$^$9!#$3$l$,=i4|@_Dj\e(B \e$B$K$J$C\e(B
-\e$B$F$$$^$9!#8e$G%>%s%S$r\e(B (@kbd{A z} \e$B$K$h$C$F\e(B) \e$B354Q$7$?$j!"\e(B(@kbd{S z} \e$B$K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:_$rC5$7$^$9!#=
 
 @code{gnus-group-fetch-control-use-browse-url} \e$B$,Hs\e(B-@code{nil} \e$B$@$C$?$i!"\e(B
 gnus \e$B$O\e(B @code{browse-url} \e$B$r;H$C$F%3%s%H%m!<%k%a%C%;!<%8$r3+$-$^$9!#$=$&\e(B
-\e$B$G$J$$>l9g$O\e(B @code{ange-ftp} \e$B$r;H$C$F<hF@$5$l!"0l;~%0%k!<%W\e(B \e$B$KI=<($5$l$^\e(B
+\e$B$G$J$$>l9g$O\e(B @code{ange-ftp} \e$B$r;H$C$F<hF@$5$l!"0l;~%0%k!<%W$KI=<($5$l$^\e(B
 \e$B$9!#\e(B
 
 \e$B%3%s%H%m!<%k%a%C%;!<%8$O05=L$5$l$F$$$k$3$H$KCm0U$7$F2<$5$$!#$3$N%3%^%s%I\e(B
@@ -6925,8 +6925,8 @@ Gnus \e$B$O$"$J$?$,FI$`$G$"$m$&5-;v$h$j$b$?$/$5$s$N5-;v$r<hF@$7$^$9!#$3$l$O\e(B
 \e$B$=$l$r$"$J$?$N%[!<%`%G%#%l%/%H%j!<$N2<$NJL$N>l=j$K%-%c%C%7%e$9$k$N$O0UL#\e(B
 \e$B$NL5$$;v$G$9!#$"$J$?$,FsG\$NMFNL$r;H$&;v$,NI$$$H46$8$J$$8B$j$O!#\e(B
 
-\e$B%-%c%C%7%e$r@)8B$9$k$?$a$K!"\e(B@code{gnus-cacheable-groups} \e$B$r\e(B \e$B$r%-%c%C%7%e\e(B
-\e$B$9$k%0%k!<%W$NO"A[%j%9%H!"Nc$($P\e(B @samp{^nntp} \e$B$H$9$k$+!"@55,I=\e(B
+\e$B%-%c%C%7%e$r@)8B$9$k$?$a$K!"\e(B@code{gnus-cacheable-groups} \e$B$r%-%c%C%7%e$9\e(B
+\e$B$k%0%k!<%W$NO"A[%j%9%H!"Nc$($P\e(B @samp{^nntp} \e$B$H$9$k$+!"@55,I=\e(B
 \e$B8=\e(B @code{gnus-uncacheable-groups} \e$B$rNc$($P!"\e(B@samp{^nnml} \e$B$K@_Dj$7$F2<$5\e(B
 \e$B$$!#N>J}$NJQ?t$N=i4|CM$O\e(B @code{nil} \e$B$G$9!#$b$7%0%k!<%W$,N>J}$N@55,I=8=$K\e(B
 \e$B9gCW$9$k$H!"$=$N%0%k!<%W$O%-%c%C%7%e$5$l$^$;$s!#\e(B
@@ -7594,7 +7594,7 @@ Gnus \e$B$O%U%!%$%k$r1\Mw$9$k$N$r7hDj$9$k$N$K\e(B@dfn{\e$B5,B'JQ?t\e(B}\e$B$rMQ$$$^$9
 @vindex gnus-uu-save-in-digest
 @code{nil} \e$B$G$J$$$N$O!"\e(B@code{gnus-uu} \e$B$,I|9f2=$r$7$J$$$GJ]B8$r$9$k$h$&$K\e(B
 \e$B8@$o$l$?$H$-$K!"MWLs$rJ]B8$9$k$H$$$&;v$G$9!#$3$NJQ?t$,\e(B @code{nil} \e$B$G$"$k\e(B
-\e$B$H!"\e(B@code{gnus-uu} \e$B$O\e(B \e$B2?$b>~$j$r$7$J$$$GA4$F$r%U%!%$%k$KJ]B8$7$^$9!#MWLs\e(B
+\e$B$H!"\e(B@code{gnus-uu} \e$B$O2?$b>~$j$r$7$J$$$GA4$F$r%U%!%$%k$KJ]B8$7$^$9!#MWLs\e(B
 \e$B$O\e(B RFC1153 \e$B=`$8$F$$$^$9!=!=0UL#$N$"$kNL$r;XDj$7$F!"HV9f$rH/9T$9$k4JC1$J\e(B
 \e$BJ}K!$,8+$D$+$i$J$+$C$?$N$G!"C1=c$K$=$l$i$O@Z$jMn$H$7$F$$$^$9!#\e(B
 @end table
@@ -7692,7 +7692,7 @@ Gnus \e$B$O%U%!%$%k$r1\Mw$9$k$N$r7hDj$9$k$N$K\e(B@dfn{\e$B5,B'JQ?t\e(B}\e$B$rMQ$$$^$9
 * Article Washing::             \e$B?M@8$r$b$C$H$h$/$9$k$?$/$5$s$N5$$NMx$$$?\e(B
                                 \e$B4X?t\e(B
 * Article Header::              \e$B%X%C%@!<$r$$$m$$$mJQ7A$5$;$k\e(B
-* Article Buttons::             URL \e$B$d\e(B Message-ID \e$B$d\e(B \e$B%"%I%l%9$J$I$r%/%j%C\e(B
+* Article Buttons::             URL \e$B$d\e(B Message-ID \e$B$d%"%I%l%9$J$I$r%/%j%C\e(B
                                 \e$B%/$9$k\e(B
 * Article Date::                \e$B$0$:$0$:8@$&$J!"@$3&;~$@\e(B!
 * Article Display::             X-Face, Picons, Smileys \e$B$rI=<($9$k\e(B
@@ -7801,7 +7801,7 @@ Fonts})\e$B!#F1$8%a%C%;!<%8$NCf$KJ#?t$N5-;v$+$i$N0zMQ$,$"$k$H!"\e(Bgnus \e$B$O$=$l$
 @cindex gnus-article-emphasize
 @kindex W e (\e$B35N,\e(B)
 \e$B?M!9$O$h$/%K%e!<%9$N5-;v$G\e(B @samp{_\e$B$3$l\e(B_} \e$B$d\e(B @samp{*\e$B$3$l\e(B*} \e$B$^$?\e(B
-\e$B$O\e(B @samp{/\e$B$3$l\e(B/} \e$B$N$h$&$J$b$N$r;H$C$FC18l$r6/D4$7$^$9!#\e(BGnus \e$B$O\e(B \e$B5-;v$rL?\e(B
+\e$B$O\e(B @samp{/\e$B$3$l\e(B/} \e$B$N$h$&$J$b$N$r;H$C$FC18l$r6/D4$7$^$9!#\e(BGnus \e$B$O5-;v$rL?\e(B
 \e$BNa\e(B @kbd{W e} (@code{gnus-article-emphasize}) \e$B$K$+$1$k;v$K$h$C$FAGE($K8+\e(B
 \e$B$($k$h$&$K$G$-$^$9!#\e(B
 
@@ -8126,7 +8126,7 @@ gnus \e$B$,5-;v$rI=<($9$k4{Dj$N$d$jJ}$rJQ$($?$$$H$-\e(B
 @cindex M****s*** sm*rtq**t*s
 @cindex Latin 1
 @code{gnus-article-dumbquotes-map} \e$B$K1~$8$F!"%^"#"#"#%="#\e(B
-\e$B"#\e(B sm*rtq**t*s \e$B$r=hM}$7$^$9\e(B \e$B$3$N4X?t$OJ8;z$,\e(B sm*rtq**t* \e$B$+$I$&$+$r?dB,$7\e(B
+\e$B"#\e(B sm*rtq**t*s \e$B$r=hM}$7$^$9!#$3$N4X?t$OJ8;z$,\e(B sm*rtq**t* \e$B$+$I$&$+$r?dB,$7\e(B
 \e$B$^$9$N$G!"BPOCE*$K$N$_;HMQ$5$l$k$Y$-$G$"$k$3$H$KCm0U$7$F$/$@$5$$!#\e(B
 
 Sm*rtq**t*s \e$B$O$b$C$HB?$/$N0zMQJ8;z$rDs6!$9$k$?$a$K!"%^"#"#"#%="#"#$,>!<j\e(B
@@ -9411,7 +9411,7 @@ Gnus \e$B$N\e(B info \e$B$N@a\e(B (node) \e$B$K0\F0$7$^$9\e(B (@code{gnus-info-find-no
 @findex gnus-summary-read-document
 \e$B$3$NL?Na$O>e$N$b$N$KHs>o$K;w$F$$$^$9$,!"$$$/$D$+$NJ8=q$r0l$D$NBg!<$-$$%0\e(B
 \e$B%k!<%W$K=8$a$^$9\e(B (@code{gnus-summary-read-read-document})\e$B!#$=$l$O$$$/$D\e(B
-\e$B$+$N\e(B @code{nndoc} \e$B%0%k!<%W$r$=$l$>$l$NJ8=q$N$?$a$K\e(B \e$B3+$-!"$=$l$+$i$3$l$i\e(B
+\e$B$+$N\e(B @code{nndoc} \e$B%0%k!<%W$r$=$l$>$l$NJ8=q$N$?$a$K3+$-!"$=$l$+$i$3$l$i\e(B
 \e$B$N\e(B @code{nndoc} \e$B%0%k!<%W$N>e$K\e(B @code{nnvirtual} \e$B%0%k!<%W$r3+$/;v$K$h$C$F\e(B
 \e$B$3$N;v$r2DG=$K$7$F$$$^$9!#$3$NL?Na$O%W%m%;%9\e(B/\e$B@\F,0z?t$N=,47$rM}2r$7$^\e(B
 \e$B$9\e(B (@pxref{Process/Prefix})\e$B!#\e(B
@@ -9593,9 +9593,9 @@ Parameters}) \e$B$rJT=8$7$^$9\e(B (@code{gnus-summary-edit-parameters})\e$B!#\e(B
 \e$B$O$=$l$OB.EY$r$H$F$bB.$/$9$k$+$i$G$9\e(B) \e$B$N;HMQ2DG=$J\e(B @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$3\e(B
+\e$BIU$1$l$P!"$=$l$O$3$N\e(B Message-ID \e$B$r%-%c%C%7%e$K2C$($^$9!#<!$K$3\e(B
 \e$B$N\e(B Message-ID \e$B$K$G$"$C$?$H$-$O!"\e(B@samp{M} \e$B0u$K$h$C$F5-;v$K4{FI$N0u$rIU$1\e(B
 \e$B$^$9!#$=$l$O$=$N5-;v$,$I$N%0%k!<%W$K$"$k$+$O5$$K$7$^$;$s!#\e(B
 
@@ -10416,7 +10416,7 @@ ISP \e$B$,\e(B POP-before-SMTP \e$B$NG'>Z$rMW5a$7$F$$$k>l9g$KM-MQ$G$9!#4X\e(B
 \e$B$b$7$"$J$?$N%K%e!<%9%5!<%P!<$,K\Ev$K%a!<%j%s%0%j%9%H$+$i\e(B @sc{nntp} \e$B%5!<\e(B
 \e$B%P!<$X$N%2!<%H%&%'%$$rDs6!$7$F$$$k$N$G$"$l$P!"$=$l$i$N%0%k!<%W$OLdBj$J$/\e(B
 \e$BFI$a$k$G$7$g$&!#$7$+$74JC1$K$O$=$l$i$KEj9F\e(B/\e$B%U%)%m!<%"%C%W$9$k$3$H$O$G$-\e(B
-\e$B$^$;$s!#0l$D$N2r7hK!$O\e(B \e$B%0%k!<%W%Q%i%a!<\e(B
+\e$B$^$;$s!#0l$D$N2r7hK!$O%0%k!<%W%Q%i%a!<\e(B
 \e$B%?\e(B (@pxref{Group Parameters}) \e$B$K\e(B @code{to-address} \e$B$r2C$($k;v$G$9!#4JC1\e(B
 \e$B$K$G$-$k$N$O!"\e(B@code{gnus-mailing-list-groups} \e$B$r!"K\Ev$K%a!<%j%s%0%j%9%H\e(B
 \e$B$G$"$k$h$&$J%0%k!<%W$K9gCW$9$k@55,I=8=$K@_Dj$9$k$3$H$G$9!#$=$N8e$O!"$9$/\e(B
@@ -10771,7 +10771,7 @@ from date id references chars lines xref extra \e$B$N3F%X%C%@!<$+$i@.$k%Y%/\e(B
 
 @cindex nndraft
 @vindex nndraft-directory
-\e$B2<=q$-%0%k!<%W$O\e(B @samp{nndraft:drafts} \e$B$H8F$P$l$kFCJL$J%0%k!<%W\e(B \e$B$G$9\e(B (\e$B$b\e(B
+\e$B2<=q$-%0%k!<%W$O\e(B @samp{nndraft:drafts} \e$B$H8F$P$l$kFCJL$J%0%k!<%W$G$9\e(B (\e$B$b\e(B
 \e$B$7$"$J$?$,A4$F$rCN$i$J$1$l$P$J$i$J$$$N$G$"$l$P!"$=$l$O\e(B @code{nndraft} \e$B%0\e(B
 \e$B%k!<%W$H$7$F<BAu$5$l$F$$$^$9\e(B)\e$B!#JQ?t\e(B @code{nndraft-directory} \e$B$O$=$N%U%!\e(B
 \e$B%$%k$r\e(B @code{nndraft} \e$B$,$I$3$KJ]4I$9$k$Y$-$+$r;XDj$7$^$9!#$3$N%0%k!<%W$,\e(B
@@ -12851,13 +12851,13 @@ table) \e$B$K=>$C$F40A4$K9gCW$7$J$1$l$P$J$j$^$;$s!#@55,I=8=$G%U%#!<%k%IL>$+\e(B
 @findex nnmail-split-fancy-with-parent
 \e$B4X?t\e(B @code{nnmail-split-fancy-with-parent} \e$B$O!"%U%)%m!<%"%C%W5-;v$r?F5-\e(B
 \e$B;v$HF1$8%0%k!<%W$K?6$jJ,$1$k$?$a$K;H$$$^$9!#%a!<%k$N?6$jJ,$1$r0l@87|L?@_\e(B
-\e$BDj$7$F$_$F$b40`z$K$O$G$-$J$$$3$H$,$"$j$^$9$M!#\e(B \e$BNc$($P!">e;J$+$i8D?M08$F\e(B
-\e$B$N%a!<%k$,FO$$$?$H$7$^$9!#<+J,$,7H$C$F$$$k%W%m%8%'%/%H$H$OJL$NOC$G$9!#$1\e(B
-\e$B$l$I!VB>$N%a!<%k$H6hJL$G$-$k$h$&$K$3$l$3$l$3$&$$$&8@MU$rI=Bj$K=q$$$F$/$@\e(B
-\e$B$5$$!W$H>e;J$K8~$+$C$F;X?^$9$k$o$1$K$O$$$-$^$;$s$+$i!"7k6I<+J,$N<j$rHQ$o\e(B
-\e$B$7$F$R$H$D$R$H$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\e(B @samp{H} \e$B0u$,IU$-$^$9!#;~!9$3$l$i$N%a%C%;!<%8$rD4$Y$F$_$F!"$d$C\e(B
-\e$B$Q$j\e(B spam \e$B$G$O$J$+$C$?$9$Y$F$N5-;v$+$i\e(B @samp{H} \e$B0u$r>C$5$J$1$l$P$J$j$^$;\e(B
-\e$B$s!#\e(BSpam \e$B%0%k!<%W$+$iH4$1$k$H$-$K!"\e(B@samp{H} \e$B0u$,IU$$$?$^$^$N$9$Y$F$N%a%C\e(B
-\e$B%;!<%8$O\e(B spam \e$B8!=P%(%s%8%s\e(B (bogofilter\e$B!"\e(Bifile\e$B!"$=$NB>\e(B) \e$B$KEO$5$l$^$9!#\e(B
-@samp{H} \e$B0u$r>C$9$K$O\e(B @kbd{M-u} \e$B$G5-;v$r\e(B "\e$BL$FI\e(B" \e$B$K$9$k$+!"\e(B@kbd{d} \e$B$G$=$l\e(B
-\e$B$r\e(B spam \e$B$G$O$J$$$b$N$H$7$FFI$s$@$3$H$r@k8@$7$F2<$5$$!#%0%k!<%W$rH4$1$?$H\e(B
-\e$B$-!"$9$Y$F$N\e(B @samp{H} \e$B0u$,IU$$$?5-;v$O%;!<%V$5$l$?$+$I$&$+$K4X78L5$/!"\e(B
-Bogofilter \e$B$+\e(B ifile (@code{spam-use-bogofilter} \e$B$H\e(B @code{spam-use-ifile} \e$B$K\e(B
-\e$B$h$k\e(B) \e$B$KAw$i$l!"$=$l$i$r\e(B spam \e$B$NI8K\$H$7$F3X=,$7$^$9!#\e(B
+\e$B$^$?!"\e(B@code{spam.el} \e$B$r\e(B load \e$B$9$k$H!"$=$NJQ?t72$r%+%9%?%^%$%:$9$k$3$H$,\e(B
+\e$B$G$-$k$h$&$K$J$j$^$9!#\e(B@samp{spam} \e$BJQ?t%0%k!<%W$K$D$$\e(B
+\e$B$F\e(B @code{customize-group} \e$B$r;n$7$F$_$F2<$5$$!#\e(B
+
+Ham \e$B%W%m%;%C%5!<$H\e(B spam \e$B%W%m%;%C%5!<$N35G0$OHs>o$K=EMW$G$9!#$"$k%0%k!<%W\e(B
+\e$B$N\e(B ham \e$B%W%m%;%C%5!<$H\e(B spam \e$B%W%m%;%C%5!<$O!"\e(B@code{spam-process} \e$B%0%k!<%W\e(B
+\e$B%Q%i%a!<%?$+\e(B @code{gnus-spam-process-newsgroups} \e$BJQ?t$G@_Dj$9$k$3$H$,$G\e(B
+\e$B$-$^$9!#8e$GF1MM$N%a!<%k$r\e(B spam \e$B$G$O$J$$$H2r<a$G$-$k$h$&$K$9$k$?$a$K!"\e(B
+ham \e$B%W%m%;%C%5!<$OHs\e(B spam (@emph{ham}) \e$B$G$"$k$3$H$,$o$+$C$F$$$k%a!<%k$r\e(B
+\e$B<u$1<h$C$F!"2?$i$+$NJ}K!$G=hM}$7$^$9!#\e(BSpam \e$B%W%m%;%C%5!<$O!"8e$GF1MM\e(B
+\e$B$N\e(B spam \e$B$,8!=P$5$l$k$h$&$K!"\e(Bspam \e$B$G$"$k$3$H$,$o$+$C$F$$$k%a!<%k$r<u$1<h$C\e(B
+\e$B$F=hM}$7$^$9!#\e(B
+
+gnus \e$B$O$"$J$?$,<u$1<h$C$?\e(B spam \e$B$+$i3X$S$^$9!#$"$J$?$O0l$D0J>e$N\e(B spam \e$B%0\e(B
+\e$B%k!<%W$K\e(B spam \e$B5-;v$r=8$a$F!"JQ?t\e(B @code{spam-junk-mailgroups} \e$B$rE,@Z$K@_\e(B
+\e$BDj$b$7$/$O%+%9%?%^%$%:$7$J$1$l$P$J$j$^$;$s!#$^$?!"\e(Bspam \e$B$r4^$a$k%0%k!<%W\e(B
+\e$B$r!"$=$N%0%k!<%W%Q%i%a!<\e(B
+\e$B%?\e(B @code{spam-contents} \e$B$r\e(B @code{gnus-group-spam-classification-spam} \e$B$K\e(B
+\e$B@_Dj$9$k$+!"$^$?$O$=$l$KBP1~$9$kJQ\e(B
+\e$B?t\e(B @code{gnus-spam-newsgroup-contents} \e$B$r%+%9%?%^%$%:$9$k$3$H$K$h$C$F@k\e(B
+\e$B8@$9$k$3$H$,$G$-$^$9!#\e(B@code{spam-contents} \e$B%0%k!<%W%Q%i%a!<%?\e(B
+\e$B$H\e(B @code{gnus-spam-newsgroup-contents} \e$BJQ?t$O!"$=$l$i$N<oJL\e(B
+\e$B$r\e(B @code{gnus-group-spam-classification-ham} \e$B$K@_Dj$9$k$3$H$K$h$C$F!"\e(B
+@emph{ham} \e$B%0%k!<%W$G$"$k$3$H$r@k8@$9$k$?$a$K;H$&$3$H$b$G$-$^$9!#%0%k!<\e(B
+\e$B%W$,\e(B @code{spam-junk-mailgroups}, @code{spam-contents} \e$B$^$?\e(B
+\e$B$O\e(B @code{gnus-spam-newsgroup-contents} \e$B$G$"$k$3$H$r<($9J,N`$,9T$J$o$l$F\e(B
+\e$B$$$J$$$H!"$=$l$i$O\e(B @emph{\e$BL$J,N`\e(B} \e$B$G$"$k$H2r<a$5$l$^$9!#$9$Y$F$N%0%k!<%W\e(B
+\e$B$O%G%#%U%)%k%H$G$OL$J,N`$G$9!#\e(B
+
+Spam \e$B%0%k!<%W$G$O!"%G%#%U%)%k%H$G$9$Y$F$N%a%C%;!<%8$,\e(B spam \e$B$G$"$k$H2r<a\e(B
+\e$B$5$l$^$9\e(B: \e$B$=$N%0%k!<%W$KF~$k$H!"$=$l$i$K\e(B @samp{H} \e$B0u$,IU$-$^$9!#;~!9$3$l\e(B
+\e$B$i$N%a%C%;!<%8$rD4$Y$F$_$F!"$d$C$Q$j\e(B spam \e$B$G$O$J$+$C$?$9$Y$F$N5-;v$+$i\e(B
+@samp{H} \e$B0u$r>C$5$J$1$l$P$J$j$^$;$s!#\e(B@samp{H} \e$B0u$r>C$9$K$O\e(B @kbd{M-u} \e$B$G\e(B
+\e$B$=$N5-;v$r!VL$FI!W$K$9$k$+!"$"$k$$$O\e(B @kbd{d} \e$B$G\e(B spam \e$B$G$O$J$$$b$N$H$7$F\e(B
+\e$BFI$s$@$3$H$r@k8@$9$l$PNI$$$G$7$g$&!#%0%k!<%W$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+\e$B$l$^$9!#$3$N2>Dj$O!"K\J*$N\e(B spam \e$B$r8!=P$9$k$?$a$K>C5n\e(B (kill) \e$B%U%!%$%k$+%9\e(B
+\e$B%3%"%U%!%$%k$rFCJL$K;H$C$F$$$k>l9g$O4V0c$C$F$$$k$+$b$7$l$^$;$s!#$=$&$G$"\e(B
+\e$B$l$P\e(B @code{spam-ham-marks} \e$BJQ?t$rD4@0$9$k$Y$-$G$9!#\e(B
+
+@defvar spam-ham-marks
+\e$B$3$NJQ?t$r\e(B ham \e$B$G$"$k$H2r<a$7$?$$0u$N%j%9%H$K@_Dj$9$k$3$H$,$G$-$^$9!#%G%#\e(B
+\e$B%U%)%k%H$G$O!">C5n\e(B (deleted)\e$B!"4{FI\e(B (read)\e$B!":o=|\e(B (killed)\e$B!"\e(Bkill \e$B%U%!%$%k\e(B
+\e$B$K$"$k$b$N\e(B (kill-filed) \e$B$*$h$SDc$$%9%3%"\e(B (low-score) \e$B0u$N%j%9%H$G$9!#\e(B
+@end defvar
+
+@defvar spam-spam-marks
+\e$B$3$NJQ?t$r\e(B spam \e$B$G$"$k$H2r<a$7$?$$0u$N%j%9%H$K@_Dj$9$k$3$H$,$G$-$^$9!#%G%#\e(B
+\e$B%U%)%k%H$G$O\e(B spam \e$B0u$@$1$r;}$D%j%9%H$G$9!#\e(B
+@end defvar
+
+\e$B%0%k!<%W$rH4$1$k$H$-$K\e(B (\e$B$=$N%0%k!<%W$,\e(B @emph{\e$B2?\e(B} \e$B$G$"$C$F$b\e(B)\e$B!"$=\e(B
+\e$B$N\e(B @code{spam-contents} \e$B$NJ,N`$K$+$+$o$i$:!"\e(Bspam \e$B0u$,IU$$$F$$$k$9$Y$F$N\e(B
+\e$B5-;v$O\e(B spam \e$B%W%m%;%C%5!<$KAw$i$l!"$=$l$i$r\e(B spam \e$B$NI8K\$H$7$F3X=,$7$^$9!#\e(B
+\e$B0U?^E*$K$?$/$5$s$N>C5n$r9T$J$&$H!"$?$^$K$=$l$O8+$F$$$J$$\e(B @samp{K} \e$B0u$,IU\e(B
+\e$B$$$?5-;v$G=*$o$k$+$b$7$l$^$;$s!#$=$7$F$=$l$i$O6vA3$K\e(B spam \e$B$r4^$s$G$$$k$+\e(B
+\e$B$b$7$l$^$;$s!#:G$bNI$$$N$O!"K\Ev$N\e(B spam \e$B$K\e(B @samp{H} \e$B$,IU$$$F$$$F!"B>$K2?\e(B
+\e$B$bL5$$$3$H$r3N$+$a$k$3$H$G$9!#\e(B
+
+@emph{Spam} \e$B%0%k!<%W$rH4$1$k$H$-$K!"\e(Bspam \e$B0u$,IU$$$F$$$k$9$Y$F$N5-;v\e(B
+\e$B$K$O\e(B spam \e$B%W%m%;%C%5!<$G=hM}$7$?8e$G4|8B@Z$l>C5n$N0u$,IU$1$i$l$^$9!#$3$l\e(B
+\e$B$O\e(B @emph{\e$BL$J,N`\e(B} \e$B$^$?$O\e(B @emph{ham} \e$B%0%k!<%W$KBP$7$F$O9T$J$o$l$^$;$s!#\e(B
+
+@emph{Ham} \e$B%0%k!<%W$rH4$1$k$H$-$K!"\e(Bham \e$B0u$,IU$$$F$$$k$9$Y$F$N5-;v\e(B
+\e$B$O\e(B ham \e$B%W%m%;%C%5!<$KAw$i$l!"$=$l$i$r\e(B spam \e$B$G$O$J$$I8K\$H$7$F3X=,$7$^$9!#\e(B
+
+@strong{TODO: @code{spam-use-ifile} \e$B$O8=>u$G$OF0:n$7$^$;$s!#;d\e(B (\e$BLuCm\e(B:
+Teodor Zlatanov) \e$B$O$=$N5!G=$,\e(B @code{spam.el} \e$B$G$O$J$/\e(B
 \e$B$F\e(B @code{ifile-gnus.el} \e$B$G9T$J$o$l$k$Y$-$@$H;W$&$N$G!"\e(B
-@code{ifile-gnus.el} \e$B$N:n<T$+$i$N\e(B info \e$B$rBT$C$F$$$^$9!#\e(B}
+@code{ifile-gnus.el} \e$B$N:n<T$+$i$N\e(B info \e$B$rBT$C$F$$$^$9!#F~$C$F$/$k%a!<%k\e(B
+\e$B$rJ,3d$9$k$?$a$K\e(B ifile \e$B$r;H$$$?$$$H\e(B @code{spam-split} \e$B$KEA$($k$?$a$K!":#\e(B
+\e$B$^$G$I$*$j\e(B @code{spam-use-ifile} \e$B$r;H$&$3$H$O$G$-$^$9!#\e(B}
 
 \e$BF~$C$F$/$k%a!<%k$r_I2a$9$kL\E*$G\e(B @code{spam.el} \e$B$r;H$&$K$O!"FC5iJ,3d%j%9\e(B
 \e$B%H\e(B @code{nnmail-split-fancy} \e$B$^$?$O\e(B @code{nnimap-split-fancy} \e$B$K0J2<$rDI\e(B
@@ -20986,11 +21028,12 @@ Bogofilter \e$B$+\e(B ifile (@code{spam-use-bogofilter} \e$B$H\e(B @code{spam-use-if
 \e$B$O\e(B @code{nnimap-split-fancy} \e$B$+$i8F$P$l$k$3$H$KCm0U$7$F2<$5$$!#\e(B
 
 @code{spam-split} \e$B4X?t$OF~$C$F$/$k%a!<%k$r=hM}$7!"\e(Bspam \e$B$H;W$o$l$k%a!<%k\e(B
-\e$B$rJQ?t\e(B @code{spam-split-group} \e$B$GM?$($i$l$kL>A0$N%0%k!<%W$KAw$j$^$9!#DL\e(B
-\e$B>o$=$N%0%k!<%WL>$O\e(B @samp{spam} \e$B$G$9!#\e(B
+\e$B$rJQ?t\e(B @code{spam-split-group} \e$B$GM?$($i$l$kL>A0$N%0%k!<%W$KAw$j$^$9!#%G%#\e(B
+\e$B%U%)%k%H$G$O$=$N%0%k!<%WL>$O\e(B @samp{spam} \e$B$G$9$,!"%+%9%?%^%$%:$9$k$3$H$O\e(B
+\e$B2DG=$G$9!#\e(B
 
 \e$B0J2<$O\e(B @code{spam-split} \e$B$NF0:n$r@)8f$9$k$?$a$K;H$&$3$H$,$G$-$k3F<o$NJ}\e(B
-\e$BK!$G$9!#\e(B
+\e$BK!$H!"$=$l$i$KBP1~$9$k\e(B spam \e$B$H\e(B ham \e$B$N%W%m%;%C%5!<$G$9\e(B:
 
 @menu
 * Blacklists and Whitelists::   
@@ -21009,31 +21052,56 @@ Bogofilter \e$B$+\e(B ifile (@code{spam-use-bogofilter} \e$B$H\e(B @code{spam-use-if
 @cindex spam.el
 
 @defvar spam-use-blacklist
-\e$B%V%i%C%/%j%9%H$r;H$$$?$$$J$i$P!"$3$NJQ?t$r\e(B t (\e$B%G%#%U%)%k%H\e(B) \e$B$K@_Dj$7$F2<\e(B
-\e$B$5$$!#\e(B
+\e$BF~$C$F$/$k%a!<%k$rJ,3d$9$k$H$-$K%V%i%C%/%j%9%H$r;H$$$?$$>l9g$O!"$3$NJQ?t\e(B
+\e$B$r\e(B t \e$B$K@_Dj$7$F2<$5$$!#Aw?.<T$,%V%i%C%/%j%9%H$K:\$C$F$$$k%a%C%;!<%8\e(B
+\e$B$O\e(B @code{spam-split-group} \e$B$KAw$i$l$^$9!#$3$l$OL@<(E*$J_I2a4o$G!"Aw?.<T\e(B
+\e$B$,\e(B spammer \e$B$G$"$k$3$H$,E,59$5$l$F$$$k%a!<%k$KBP$7$F$@$1F0:n$7$^$9!#\e(B
 @end defvar
 
 @defvar spam-use-whitelist
-\e$B%[%o%$%H%j%9%H;H$$$?$$>l9g$O!"$3$NJQ?t$r\e(B t \e$B$K@_Dj$7$F2<$5$$!#\e(B
+\e$BF~$C$F$/$k%a!<%k$rJ,3d$9$k$H$-$K%[%o%$%H%j%9%H$r;H$$$?$$>l9g$O!"$3$NJQ?t\e(B
+\e$B$r\e(B t \e$B$K@_Dj$7$F2<$5$$!#Aw?.<T$,%[%o%$%H%j%9%H$K:\$C$F$$$J$$%a%C%;!<%8\e(B
+\e$B$O\e(B @code{spam-split-group} \e$B$KAw$i$l$^$9!#$3$l$O0EL[$N_I2a4o$G!"B>$NJ}K!\e(B
+\e$B$GEA$($i$l$J$+$C$?$J$i$P!"$9$Y$F$N?M$r\e(B spammer \e$B$G$"$k$H8+$J$7$^$9!#Cm0U\e(B
+\e$B$7$F;H$C$F2<$5$$!#\e(B
+@end defvar
+
+@defvar gnus-group-spam-exit-processor-blacklist
+\e$B$3$N%7%s%\%k$r!"%0%k!<%W%Q%i%a!<%?$N%+%9%?%^%$%:$K$h$C$F%0%k!<%W\e(B
+\e$B$N\e(B @code{spam-process} \e$B%Q%i%a!<%?$K2C$($k$+!"$^$?\e(B
+\e$B$O\e(B @code{gnus-spam-process-newsgroups} \e$BJQ?t$K2C$($F2<$5$$!#$3$N%7%s%\%k\e(B
+\e$B$,%0%k!<%W$N\e(B @code{spam-process} \e$B%Q%i%a!<%?$K2C$($i$l$k$H!"\e(Bspam \e$B0u$,IU$$\e(B
+\e$B$?5-;v$NAw?.<T$,%V%i%C%/%j%9%H$KDI2C$5$l$^$9!#\e(B
+@end defvar
+
+@defvar gnus-group-ham-exit-processor-whitelist
+\e$B$3$N%7%s%\%k$r!"%0%k!<%W%Q%i%a!<%?$N%+%9%?%^%$%:$K$h$C$F%0%k!<%W\e(B
+\e$B$N\e(B @code{spam-process} \e$B%Q%i%a!<%?$K2C$($k$+!"$^$?\e(B
+\e$B$O\e(B @code{gnus-spam-process-newsgroups} \e$BJQ?t$K2C$($F2<$5$$!#$3$N%7%s%\%k\e(B
+\e$B$,%0%k!<%W$N\e(B @code{spam-process} \e$B%Q%i%a!<%?$K2C$($i$l$k$H!"\e(Bham \e$B0u$,IU$$\e(B
+\e$B$?\e(B @emph{ham} \e$B%0%k!<%W$N5-;v$NAw?.<T$,%[%o%$%H%j%9%H$KDI2C$5$l$^$9!#$3\e(B
+\e$B$N\e(B ham \e$B%W%m%;%C%5!<$O\e(B @emph{spam} \e$B$+\e(B @emph{\e$BL$J,N`\e(B} \e$B%0%k!<%W$K$O8z2L$r5Z\e(B
+\e$B$\$5$J$$$3$H$KCm0U$7$F2<$5$$!#\e(B
 @end defvar
 
 \e$B%V%i%C%/%j%9%H$O!"$"$J$?$,\e(B spam \e$B$NAw?.<T$@$H9M$($k%"%I%l%9$K9gCW$9$k@55,\e(B
 \e$BI=8=$N%j%9%H$G$9!#Nc$($P\e(B @samp{vmadmin.com} \e$B$NC/$+$i$G$bMh$k%a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O\e(B @code{spam-directory} \e$BJQ?t\e(B (\e$B%G%#\e(B
-\e$B%U%)%k%H$O\e(B @file{~/News/spam}) \e$B$G%+%9%?%^%$%:$G$-$^$9!#%V%i%C%/%j%9%H$H\e(B
-\e$B%[%o%$%H%j%9%H$N%U%!%$%k$O$=$N%G%#%l%/%H%j$K$"$j!"$=$l$>\e(B
+\e$B%V%i%C%/%j%9%H$H%[%o%$%H%j%9%H$N%U%!%$%k$N=j:_$O!"\e(B
+@code{spam-directory} \e$BJQ?t\e(B (\e$B%G%#%U%)%k%H$O\e(B @file{~/News/spam}) \e$B$^$?\e(B
+\e$B$OD>@\\e(B @code{spam-whitelist} \e$B$H\e(B @code{spam-blacklist} \e$BJQ?t$G%+%9%?%^%$%:\e(B
+\e$B$9$k$3$H$,$G$-$^$9!#%[%o%$%H%j%9%H$H%V%i%C%/%j%9%H$N%U%!%$%k$O!"%G%#%U%)\e(B
+\e$B%k%H$G$O\e(B @code{spam-directory} \e$B$N%G%#%l%/%H%j$K$"$j!"$=$l$>\e(B
 \e$B$l\e(B @file{whitelist} \e$B$H\e(B @file{blacklist} \e$B$H$$$&L>A0$,IU$1$i$l$^$9!#\e(B
 
 @node BBDB Whitelists
@@ -21043,16 +21111,26 @@ Bogofilter \e$B$+\e(B ifile (@code{spam-use-bogofilter} \e$B$H\e(B @code{spam-use-if
 @cindex BBDB, spam filtering
 @cindex spam.el
 
-@defvar spam-use-bbdb
+@defvar spam-use-BBDB
 
 @code{spam-use-whitelist} (@pxref{Blacklists and Whitelists}) \e$B$K;w$F$$$^\e(B
 \e$B$9$,!"%[%o%$%H%j%9%H$N%"%I%l%9$N8;$H$7$F!"@55,I=8=$G$O$J$$\e(B BBDB \e$B$r;H$$$^\e(B
-\e$B$9!#\e(B@code{spam-use-bbdb} \e$B$r$A$c$s$HF0:n$5$;$k$K$O\e(B BBDB \e$B$r\e(B load \e$B$7$J$1$l\e(B
+\e$B$9!#\e(B@code{spam-use-BBDB} \e$B$r$A$c$s$HF0:n$5$;$k$K$O\e(B BBDB \e$B$r\e(B load \e$B$7$J$1$l\e(B
 \e$B$P$J$j$^$;$s!#\e(BBBDB \e$B$K$"$k%"%I%l%9$@$1$,5v$5$l!"B>$O$9$Y$F\e(B spam \e$B$H$7$FJ,\e(B
 \e$BN`$5$l$^$9!#\e(B
 
 @end defvar
 
+@defvar gnus-group-ham-exit-processor-BBDB
+\e$B$3$N%7%s%\%k$r!"%0%k!<%W%Q%i%a!<%?$N%+%9%?%^%$%:$K$h$C$F%0%k!<%W\e(B
+\e$B$N\e(B @code{spam-process} \e$B%Q%i%a!<%?$K2C$($k$+!"$^$?\e(B
+\e$B$O\e(B @code{gnus-spam-process-newsgroups} \e$BJQ?t$K2C$($F2<$5$$!#$3$N%7%s%\%k\e(B
+\e$B$,%0%k!<%W$N\e(B @code{spam-process} \e$B%Q%i%a!<%?$K2C$($i$l$k$H!"\e(Bham \e$B0u$,IU$$\e(B
+\e$B$?\e(B @emph{ham} \e$B%0%k!<%W$N5-;v$NAw?.<T$,\e(B BBDB \e$B$KDI2C$5$l$^$9!#$3$N\e(B ham \e$B%W\e(B
+\e$B%m%;%C%5!<$O\e(B @emph{spam} \e$B$+\e(B @emph{\e$BL$J,N`\e(B} \e$B%0%k!<%W$K$O8z2L$r5Z$\$5$J$$$3\e(B
+\e$B$H$KCm0U$7$F2<$5$$!#\e(B
+@end defvar
+
 @node Blackholes
 @subsubsection \e$B%V%i%C%/%[!<%k\e(B
 @cindex spam filtering
@@ -21077,6 +21155,22 @@ Bogofilter \e$B$+\e(B ifile (@code{spam-use-bogofilter} \e$B$H\e(B @code{spam-use-if
 
 @end defvar
 
+@defvar spam-blackhole-servers
+
+\e$B%V%i%C%/%[!<%k!&%A%'%C%/$N$?$a$K0U8+$r5a$a$k%5!<%P!<$N%j%9%H$G$9!#\e(B
+
+@end defvar
+
+@defvar spam-use-dig
+
+@code{dns.el} \e$B%Q%C%1!<%8$NBe$o$j$K\e(B @code{dig.el} \e$B%Q%C%1!<%8$r;H$$$^$9!#\e(B
+\e$B%G%#%U%)%k%H$N@_Dj$G$"$k\e(B t \e$B$,?d>)$5$l$^$9!#\e(B
+
+@end defvar
+
+\e$B%V%i%C%/%[!<%k!&%A%'%C%/$OF~$C$FMh$k%a!<%k$KBP$7$F$@$19T$J$o$l$^$9!#%V%i%C\e(B
+\e$B%/%[!<%k$K\e(B spam \e$B$^$?$O\e(B ham \e$B%W%m%;%C%5!<$O$"$j$^$;$s!#\e(B
+
 @node Bogofilter
 @subsubsection Bogofilter
 @cindex spam filtering
@@ -21085,10 +21179,10 @@ Bogofilter \e$B$+\e(B ifile (@code{spam-use-bogofilter} \e$B$H\e(B @code{spam-use-if
 
 @defvar spam-use-bogofilter
 
-Eric Raymond \e$B$N?WB.$J\e(B Bogofilter \e$B$r;HMQ$7$?$$>l9g$O!"$3$NJQ?t$r%;%C%H$7\e(B
-\e$B$F$/$@$5$$!#$3$l$O!"%P!<%8%g%s\e(B 0.4 \e$B$N%m!<%+%k$K%Q%C%A$,Ev$?$C$?%3%T!<$G\e(B
-\e$B%F%9%H$5$l$^$7$?!#\e(B@code{spam.el} \e$B$K$"$k%$%s%9%H!<%k$K4X$9$k%3%a%s%H$rFI\e(B
-\e$B$s$G3N$+$a$F2<$5$$!#\e(B
+Eric Raymond \e$B$N?WB.$J\e(B Bogofilter \e$B$r\e(B @code{spam-split} \e$B$K;HMQ$7$?$$>l9g$O!"\e(B
+\e$B$3$NJQ?t$r%;%C%H$7$F$/$@$5$$!#$3$l$O!"%P!<%8%g%s\e(B 0.4 \e$B$N%m!<%+%k$K%Q%C%A\e(B
+\e$B$,Ev$?$C$?%3%T!<$G%F%9%H$5$l$^$7$?!#\e(B@code{spam.el} \e$B$K$"$k%$%s%9%H!<%k$K\e(B
+\e$B4X$9$k%3%a%s%H$rFI$s$G3N$+$a$F2<$5$$!#\e(B
 
 Spam \e$B5-;v$@$1$N\e(B @samp{H} \e$B0u$r4XO"IU$1$k:G>.$N@$OC$K$h$C$F!"\e(BBogofilter \e$B%H\e(B
 \e$B%l!<%K%s%0$O$9$Y$F$+$J$j<+F0E*$K$J$j$^$9!#3F%+%F%4%j!<$N\e(B spam \e$B$+$=$&$G$J\e(B
@@ -21099,6 +21193,20 @@ Spam \e$B5-;v$@$1$N\e(B @samp{H} \e$B0u$r4XO"IU$1$k:G>.$N@$OC$K$h$C$F!"\e(BBogofilte
 spam \e$BEY\e(B?) \e$B%9%3%"\e(B (0.0\e$B!A\e(B1.0) \e$B$r!"%9%3%"$K:G$bCx$7$/4sM?$9$k5-;v$N8l$H$$$C\e(B
 \e$B$7$g$K!"B>$N%P%C%U%!$KI=<($9$k$3$H$rB%$7$^$9!#\e(B
 
+Path \e$B$K\e(B @code{bogofilter} \e$B$N<B9T%U%!%$%k$,L5$$>l9g!"\e(BBogofilter \e$B$N=hM}$O\e(B
+\e$B<h$j>C$5$l$^$9!#\e(B
+
+@end defvar
+
+@defvar gnus-group-spam-exit-processor-bogofilter
+\e$B$3$N%7%s%\%k$r!"%0%k!<%W%Q%i%a!<%?$N%+%9%?%^%$%:$K$h$C$F%0%k!<%W\e(B
+\e$B$N\e(B @code{spam-process} \e$B%Q%i%a!<%?$K2C$($k$+!"$^$?\e(B
+\e$B$O\e(B @code{gnus-spam-process-newsgroups} \e$BJQ?t$K2C$($F2<$5$$!#$3$N%7%s%\%k\e(B
+\e$B$,%0%k!<%W$N\e(B @code{spam-process} \e$B%Q%i%a!<%?$K2C$($i$l$k$H!"\e(Bspam \e$B0u$,IU$$\e(B
+\e$B$?5-;v$,\e(B bogofilter \e$B$N\e(B spam \e$B%G!<%?%Y!<%9$K2C$($i$l!"\e(Bham \e$B0u$,IU$$$?5-;v\e(B
+\e$B$,\e(B bogofilter \e$B$N\e(B ham \e$B%G!<%?%Y!<%9$K2C$($i$l$^$9!#\e(B
+@strong{Bogofilter \e$B$N\e(B spam \e$B%W%m%;%C%5!<$O!"$5$i$K\e(B ham \e$B=hM}$b9T$J$&$?$@0l\e(B
+\e$B$D$N\e(B spam \e$B%W%m%;%C%5!<$G$"$k$3$H$KCm0U$7$F2<$5$$!#\e(B}
 @end defvar
 
 @node Ifile spam filtering
@@ -21109,24 +21217,28 @@ spam \e$BEY\e(B?) \e$B%9%3%"\e(B (0.0\e$B!A\e(B1.0) \e$B$r!"%9%3%"$K:G$bCx$7$/4sM?$9$k5
 
 @defvar spam-use-ifile
 
-Bogofilter \e$B$K;w$?E}7WJ,@O4o$G$"$k\e(B Ifile \e$B$r;H$$$?$$>l9g$O!"$3$NJQ?t$rM-8z\e(B
-\e$B$K$7$F2<$5$$!#:#$N$H$3$m\e(B @code{ifile-gnus.el} \e$B$r\e(B load \e$B$7$J$1$l$P$J$j$^$;\e(B
-\e$B$s!#\e(BIfile \e$B$N\e(B @code{spam.el} \e$B$X$NE}9g$O$^$@:Q$s$G$$$^$;$s$,!"$=$l$r9%$`$J\e(B
-\e$B$i$P\e(B @code{ifile-gnus.el} \e$B$rC1FH$K;H$&$3$H$,$G$-$^$9!#\e(B
+Bogofilter \e$B$K;w$?E}7WJ,@O4o$G$"$k\e(B Ifile \e$B$r\e(B @code{spam-split} \e$B$K;H$$$?$$\e(B
+\e$B>l9g$O!"$3$NJQ?t$rM-8z$K$7$F2<$5$$!#:#$N$H$3\e(B
+\e$B$m\e(B @code{ifile-gnus.el} \e$B$r\e(B load \e$B$7$J$1$l$P$J$j$^$;$s!#\e(B
+Ifile \e$B$N\e(B @code{spam.el} \e$B$X$NE}9g$O$^$@:Q$s$G$$$^$;$s$,!"$=$l$r9%$`$J$i\e(B
+\e$B$P\e(B @code{ifile-gnus.el} \e$B$rC1FH$K;H$&$3$H$,$G$-$^$9!#\e(B
 
 @end defvar
 
+Ifile \e$B$O!"\e(B@code{spam-split} \e$B$rDL$7$FF~$C$FMh$?%a!<%k$r\e(B spam \e$B$H\e(B ham \e$B$K_I\e(B
+\e$B2a$9$k$@$1$N$?$a$K;H$&$3$H$,$G$-$^$9!#$=$l$O\e(B @code{ifile-gnus.el} \e$B$N<!$N\e(B
+\e$B%j%j!<%9$r;}$D\e(B @code{spam.el} \e$B$K0lAX$h$/E}9g$5$l$k$G$7$g$&!#\e(B
+
 @node Extending spam.el
 @subsubsection spam.el \e$B$N3HD%\e(B
 @cindex spam filtering
 @cindex spam.el, extending
 @cindex extending spam.el
 
-\e$B?7$7$$%P%C%/%(%s%I\e(B blackbox \e$B$rDI2C$7$?$$$"$J$?$O!"0J2<$rMQ0U$7$F2<$5$$\e(B:
+\e$B?7$7$$%P%C%/%(%s%I\e(B blackbox \e$B$rDI2C$7$?$$$"$J$?$O!"F~$C$F$/$k%a!<%k$r_I2a\e(B
+\e$B$9$k$?$a$K0J2<$rMQ0U$7$F2<$5$$\e(B:
 
 @enumerate
-@item
-\e$B@bL@J8\e(B
 
 @item
 \e$B%3!<%I\e(B
@@ -21136,7 +21248,7 @@ Bogofilter \e$B$K;w$?E}7WJ,@O4o$G$"$k\e(B Ifile \e$B$r;H$$$?$$>l9g$O!"$3$NJQ?t$rM-8
   "Blackbox \e$B$r;H$&$H$-$O\e(B t \e$B$K$9$k!#\e(B")
 @end example
 
-@code{spam-list-of-checks} \e$B$K\e(B 
+@code{spam-list-of-checks} \e$B$K\e(B
 @example
     (spam-use-blackbox  . spam-check-blackbox)
 @end example
@@ -21150,6 +21262,62 @@ Bogofilter \e$B$K;w$?E}7WJ,@O4o$G$"$k\e(B Ifile \e$B$r;H$$$?$$>l9g$O!"$3$NJQ?t$rM-8
 \e$B$?$K$G$-$k$3$H$NNc$O!"4{B8$N\e(B @code{spam-check-*} \e$B4X?t$r;2>H$7$F$/$@$5$$!#\e(B
 @end enumerate
 
+Spam \e$B$H\e(B ham \e$B%a%C%;!<%8$r=hM}$9$k$K$O!"0J2<$rMQ0U$7$F2<$5$$\e(B:
+
+@enumerate
+
+@item
+\e$B%3!<%I\e(B
+
+Spam \e$B$^$?$O\e(B ham \e$B$N%W%m%;%C%5!<$rMQ0U$9$kI,MW$O$"$j$^$;$s!#\e(B
+Blackbox \e$B$,\e(B spam \e$B$^$?$O\e(B ham \e$B$N=hM}$r%5%]!<%H$9$k>l9g$@$1!"$=$l$i$rMQ0U$7\e(B
+\e$B$F2<$5$$!#\e(B
+
+@example
+(defvar gnus-group-spam-exit-processor-blackbox "blackbox"
+  "\e$B35N,$r=P$k$H$-$K8F$P$l$k\e(B blackbox \e$B$N\e(B spam \e$B%W%m%;%C%5!<!#\e(B
+Spam \e$B%0%k!<%W$@$1$KE,MQ$5$l$k!#\e(B")
+
+(defvar gnus-group-ham-exit-processor-blackbox "blackbox"
+  "\e$B35N,$r=P$k$H$-$K8F$P$l$k\e(B blackbox \e$B$N\e(B ham \e$B%W%m%;%C%5!<!#\e(B
+Spam \e$B$G$O$J$$\e(B (\e$BL$J,N`$^$?$O\e(B ham) \e$B%0%k!<%W$@$1$KE,MQ$5$l$k!#\e(B")
+
+@end example
+
+@item
+\e$B4X?t\e(B
+
+@example
+(defun spam-blackbox-register-spam-routine ()
+  (spam-generic-register-routine
+   ;; spam \e$BMQ$N4X?t\e(B
+   (lambda (article)
+     (let ((from (spam-fetch-field-from-fast article)))
+       (when (stringp from)
+          (blackbox-do-something-with-this-spammer from))))
+   ;; ham \e$BMQ$N4X?t\e(B
+   nil))
+
+(defun spam-blackbox-register-ham-routine ()
+  (spam-generic-register-routine
+   ;; spam \e$BMQ$N4X?t\e(B
+   nil
+   ;; ham \e$BMQ$N4X?t\e(B
+   (lambda (article)
+     (let ((from (spam-fetch-field-from-fast article)))
+       (when (stringp from)
+          (blackbox-do-something-with-this-ham-sender from))))))
+@end example
+
+\e$B4X?t\e(B @code{blackbox-do-something-with-this-ham-sender} \e$B$*$h\e(B
+\e$B$S\e(B @code{blackbox-do-something-with-this-spammer} \e$B$r=q$$$F2<$5$$!#%a%C%;!<\e(B
+\e$B%8$NAw?.<T$r<h$j=P$9$h$j$bJ#;($J%3!<%I$rDI2C$9$k$3$H$O2DG=$G$9$,!"%a%C%;!<\e(B
+\e$B%8A4BN$N<h$j9~$_$O!"\e(B@code{spam-fetch-field-from-fast} \e$B$GAw?.<T$r<h$j=P\e(B
+\e$B$9\e(B (\e$B%a%C%;!<%8$NAw?.<T$O\e(B gnus \e$B$K$h$C$F5-21$5$l$F$$$k\e(B) \e$B$h$j$bCx$7$/D9$/$+\e(B
+\e$B$+$k$3$H$r3P$($F$*$$$F2<$5$$!#\e(B
+
+@end enumerate
+
 @node Filtering Spam Using Statistics (spam-stat.el)
 @subsection Spam \e$B$N_I2a$KE}7W$r;H$&\e(B (spam-stat.el)
 @cindex Paul Graham
@@ -21607,7 +21775,7 @@ XEmacs \e$B$O%Q%C%1!<%8$N=/=8$H$7$FG[I[$5$l$F$$$^$9!#\e(Bgnus \e$B$N\e(B XEmacs \e$B%
 @section \e$BNr;K\e(B
 
 @cindex history
-@sc{gnus} \e$B$O\e(B \e$BG_ED\e(B \e$B@/?.;a$K$h$C$F=q$+$l$^$7$?!#\e(B94\e$BG/$N2F$,G&$S4s$C$F$/$k$3\e(B
+@sc{gnus} \e$B$OG_ED@/?.;a$K$h$C$F=q$+$l$^$7$?!#\e(B94\e$BG/$N2F$,G&$S4s$C$F$/$k$3\e(B
 \e$B$m!"\e(BLars Magne Ingebrigtsen \e$B$OK0$-$F$-$F!"\e(BGnus \e$B$r=q$-D>$=$&$H7h?4$7$^$7\e(B
 \e$B$?!#\e(B
 
@@ -21919,8 +22087,8 @@ Gnus \e$B$OFs$D$NCJ3,$N=[4D$G3+H/$5$l$F$$$^$9!#:G=i$NCJ3,\e(B
 
 @cindex Incoming*
 @vindex mail-source-delete-incoming
-\e$B%"%k%U%!\e(B Gnusae \e$B$H\e(B \e$B%j%j!<%9$5$l$?\e(B Gnusae \e$B$G$OJQ?t$N=i4|CM$,0c$&$b$N$,$"\e(B
-\e$B$j$^$9!#FC$K!"\e(B@code{mail-source-delete-incoming} \e$B$O%"%k%U%!\e(B gnusae \e$B$G\e(B
+\e$B%"%k%U%!\e(B Gnusae \e$B$H%j%j!<%9$5$l$?\e(B Gnusae \e$B$G$OJQ?t$N=i4|CM$,0c$&$b$N$,$"$j\e(B
+\e$B$^$9!#FC$K!"\e(B@code{mail-source-delete-incoming} \e$B$O%"%k%U%!\e(B gnusae \e$B$G\e(B
 \e$B$O\e(B @code{nil} \e$B$G!"%j%j!<%9$5$l$?\e(B gnusae \e$B$G$O\e(B @code{t} \e$B$G$9!#$3$l$O%a!<%k\e(B
 \e$B$r07$C$F$$$k:]$K!"%"%k%U%!%j%j!<%9$Nsrsw$K$h$j%a!<%k$r<:$J$&$3$H$rHr$1$k\e(B
 \e$B$?$a$G$9!#\e(B
@@ -21954,7 +22122,7 @@ Micro$oft---\e$B$"$!!#%"%^%A%e%"!#;d$O\e(B @emph{\e$B$b$C$H\e(B} \e$B0-$$!#\e(B(\e$B$b$
 @itemize @bullet
 
 @item
-\e$BG_ED\e(B \e$B@/?.\e(B---\e$B85$N\e(B @sc{gnus} \e$B$r=q$$$??M$G$9!#\e(B
+\e$BG_ED@/?.\e(B---\e$B85$N\e(B @sc{gnus} \e$B$r=q$$$??M$G$9!#\e(B
 
 @item
 Shenghuo Zhu---uudecode.el, mm-uu.el, rfc1843.el, webmail.el,
@@ -23116,7 +23284,7 @@ gnus \e$B$O4pK\E*$J%a%G%#%"$r07$$$^$;$s!#$9$Y$F$O%P%C%/%(%s%I$K$h$C$F9T$J$o\e(B
 @item \e$B4pK\\e(B (native)
 @cindex native
 Gnus \e$B$O$$$D$b0l$D$NJ}K!\e(B (\e$B$H%P%C%/%(%s%I\e(B) \e$B$r%K%e!<%9$rF@$k$?$a$N\e(B @dfn{\e$B4p\e(B
-\e$BK\\e(B} \e$B$b$7$/$O=i4|@_Dj\e(B \e$B$H$7$F;H$$$^$9!#\e(B
+\e$BK\\e(B} \e$B$b$7$/$O=i4|@_Dj$H$7$F;H$$$^$9!#\e(B
 
 @item \e$B30It\e(B (foreign)
 @cindex foreign