* spam-report.el (spam-report-gmane-ham): Renamed from
[gnus] / lisp / gnus-sum.el
index 9101eef..18c92f3 100644 (file)
@@ -1,6 +1,7 @@
 ;;; gnus-sum.el --- summary mode commands for Gnus
-;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
-;;        Free Software Foundation, Inc.
+
+;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+;;   2005 Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
 ;; Keywords: news
@@ -19,8 +20,8 @@
 
 ;; You should have received a copy of the GNU General Public License
 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
 
 ;;; Commentary:
 
@@ -119,7 +120,7 @@ given by the `gnus-summary-same-subject' variable.)"
 
 (defcustom gnus-summary-make-false-root-always nil
   "Always make a false dummy root."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-thread
   :type 'boolean)
 
@@ -220,7 +221,7 @@ If this variable is nil, scoring will be disabled."
   "*Default threshold for a high scored article.
 An article will be highlighted as high scored if its score is greater
 than this score."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-score-default
   :type 'integer)
 
@@ -228,7 +229,7 @@ than this score."
   "*Default threshold for a low scored article.
 An article will be highlighted as low scored if its score is smaller
 than this score."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-score-default
   :type 'integer)
 
@@ -256,8 +257,7 @@ simplification is selected."
   "*If non-nil, hide all threads initially.
 This can be a predicate specifier which says which threads to hide.
 If threads are hidden, you have to run the command
-`gnus-summary-show-thread' by hand or use `gnus-select-article-hook'
-to expose hidden threads."
+`gnus-summary-show-thread' by hand or select an article."
   :group 'gnus-thread
   :type '(radio (sexp :format "Non-nil\n"
                      :match (lambda (widget value)
@@ -320,11 +320,11 @@ This variable can either be the symbols `first' (place point on the
 first subject), `unread' (place point on the subject line of the first
 unread article), `best' (place point on the subject line of the
 higest-scored article), `unseen' (place point on the subject line of
-the first unseen article), 'unseen-or-unread' (place point on the subject
+the first unseen article), `unseen-or-unread' (place point on the subject
 line of the first unseen article or, if all article have been seen, on the
 subject line of the first unread article), or a function to be called to
 place point on some subject line."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-group-select
   :type '(choice (const best)
                 (const unread)
@@ -368,7 +368,7 @@ ignores articles whose headers have not been fetched).
 
 NOTE: The list of unfetched articles will always be nil when plugged
 and, when unplugged, a subset of the undownloaded article list."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-summary-maneuvering
   :type '(choice (const :tag "None" nil)
                  (const :tag "Undownloaded when unplugged" undownloaded)
@@ -476,7 +476,7 @@ string with the suggested prefix."
 
 (defcustom gnus-spam-mark ?$
   "*Mark used for spam articles."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-summary-marks
   :type 'character)
 
@@ -507,13 +507,13 @@ string with the suggested prefix."
 
 (defcustom gnus-forwarded-mark ?F
   "*Mark used for articles that have been forwarded."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-summary-marks
   :type 'character)
 
 (defcustom gnus-recent-mark ?N
   "*Mark used for articles that are recent."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-summary-marks
   :type 'character)
 
@@ -529,13 +529,13 @@ string with the suggested prefix."
 
 (defcustom gnus-unseen-mark ?.
   "*Mark used for articles that haven't been seen."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-summary-marks
   :type 'character)
 
 (defcustom gnus-no-mark ?               ;Whitespace
   "*Mark used for articles that have no other secondary mark."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-summary-marks
   :type 'character)
 
@@ -561,7 +561,7 @@ string with the suggested prefix."
 
 (defcustom gnus-undownloaded-mark ?-
   "*Mark used for articles that weren't downloaded."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-summary-marks
   :type 'character)
 
@@ -780,20 +780,21 @@ Each list item can also be a list `(not F)' where F is a
 function; this specifies reversed sort order.
 
 Ready-made functions include `gnus-thread-sort-by-number',
-`gnus-thread-sort-by-author', `gnus-thread-sort-by-subject',
-`gnus-thread-sort-by-date', `gnus-thread-sort-by-score',
-`gnus-thread-sort-by-most-recent-number',
-`gnus-thread-sort-by-most-recent-date',
-`gnus-thread-sort-by-random', and
-`gnus-thread-sort-by-total-score' (see `gnus-thread-score-function').
+`gnus-thread-sort-by-author', `gnus-thread-sort-by-recipient'
+`gnus-thread-sort-by-subject', `gnus-thread-sort-by-date',
+`gnus-thread-sort-by-score', `gnus-thread-sort-by-most-recent-number',
+`gnus-thread-sort-by-most-recent-date', `gnus-thread-sort-by-random',
+and `gnus-thread-sort-by-total-score' (see
+`gnus-thread-score-function').
 
 When threading is turned off, the variable
 `gnus-article-sort-functions' controls how articles are sorted."
   :group 'gnus-summary-sort
-  :type '(repeat 
+  :type '(repeat
           (gnus-widget-reversible
            (choice (function-item gnus-thread-sort-by-number)
                    (function-item gnus-thread-sort-by-author)
+                   (function-item gnus-thread-sort-by-recipient)
                    (function-item gnus-thread-sort-by-subject)
                    (function-item gnus-thread-sort-by-date)
                    (function-item gnus-thread-sort-by-score)
@@ -948,19 +949,19 @@ automatically when it is selected."
 
 (defcustom gnus-summary-article-move-hook nil
   "*A hook called after an article is moved, copied, respooled, or crossposted."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-summary
   :type 'hook)
 
 (defcustom gnus-summary-article-delete-hook nil
   "*A hook called after an article is deleted."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-summary
   :type 'hook)
 
 (defcustom gnus-summary-article-expire-hook nil
   "*A hook called after an article is expired."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-summary
   :type 'hook)
 
@@ -968,11 +969,11 @@ automatically when it is selected."
   (and (fboundp 'display-graphic-p)
        (display-graphic-p))
   "*If non-nil, display an arrow highlighting the current article."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-summary
   :type 'boolean)
 
-(defcustom gnus-summary-selected-face 'gnus-summary-selected-face
+(defcustom gnus-summary-selected-face 'gnus-summary-selected
   "Face used for highlighting the current article in the summary buffer."
   :group 'gnus-summary-visual
   :type 'face)
@@ -981,42 +982,42 @@ automatically when it is selected."
 
 (defcustom gnus-summary-highlight
   '(((eq mark gnus-canceled-mark)
-     . gnus-summary-cancelled-face)
+     . gnus-summary-cancelled)
     ((and uncached (> score default-high))
-     . gnus-summary-high-undownloaded-face)
+     . gnus-summary-high-undownloaded)
     ((and uncached (< score default-low))
-     . gnus-summary-low-undownloaded-face)
+     . gnus-summary-low-undownloaded)
     (uncached
-     . gnus-summary-normal-undownloaded-face)
+     . gnus-summary-normal-undownloaded)
     ((and (> score default-high)
          (or (eq mark gnus-dormant-mark)
              (eq mark gnus-ticked-mark)))
-     . gnus-summary-high-ticked-face)
+     . gnus-summary-high-ticked)
     ((and (< score default-low)
          (or (eq mark gnus-dormant-mark)
              (eq mark gnus-ticked-mark)))
-     . gnus-summary-low-ticked-face)
+     . gnus-summary-low-ticked)
     ((or (eq mark gnus-dormant-mark)
         (eq mark gnus-ticked-mark))
-     . gnus-summary-normal-ticked-face)
+     . gnus-summary-normal-ticked)
     ((and (> score default-high) (eq mark gnus-ancient-mark))
-     . gnus-summary-high-ancient-face)
+     . gnus-summary-high-ancient)
     ((and (< score default-low) (eq mark gnus-ancient-mark))
-     . gnus-summary-low-ancient-face)
+     . gnus-summary-low-ancient)
     ((eq mark gnus-ancient-mark)
-     . gnus-summary-normal-ancient-face)
+     . gnus-summary-normal-ancient)
     ((and (> score default-high) (eq mark gnus-unread-mark))
-     . gnus-summary-high-unread-face)
+     . gnus-summary-high-unread)
     ((and (< score default-low) (eq mark gnus-unread-mark))
-     . gnus-summary-low-unread-face)
+     . gnus-summary-low-unread)
     ((eq mark gnus-unread-mark)
-     . gnus-summary-normal-unread-face)
+     . gnus-summary-normal-unread)
     ((> score default-high)
-     . gnus-summary-high-read-face)
+     . gnus-summary-high-read)
     ((< score default-low)
-     . gnus-summary-low-read-face)
+     . gnus-summary-low-read)
     (t
-     . gnus-summary-normal-read-face))
+     . gnus-summary-normal-read))
   "*Controls the highlighting of summary buffer lines.
 
 A list of (FORM . FACE) pairs.  When deciding how a a particular
@@ -1061,6 +1062,20 @@ which it may alter in any way."
   :group 'gnus-summary
   :type 'regexp)
 
+(defcustom gnus-summary-to-prefix "-> "
+  "*String prefixed to the To field in the summary line when
+using `gnus-ignored-from-addresses'."
+  :version "22.1"
+  :group 'gnus-summary
+  :type 'string)
+
+(defcustom gnus-summary-newsgroup-prefix "=> "
+  "*String prefixed to the Newsgroup field in the summary
+line when using `gnus-ignored-from-addresses'."
+  :version "22.1"
+  :group 'gnus-summary
+  :type 'string)
+
 (defcustom gnus-newsgroup-ignored-charsets '(unknown-8bit x-unknown)
   "List of charsets that should be ignored.
 When these charsets are used in the \"charset\" parameter, the
@@ -1146,13 +1161,13 @@ type of files to save."
 This is mostly relevant for slow back ends where the user may
 wish to widen the summary buffer to include all headers
 that were fetched.  Say, for nnultimate groups."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-summary
   :type '(choice boolean regexp))
 
 (defcustom gnus-summary-muttprint-program "muttprint"
   "Command (and optional arguments) used to run Muttprint."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-summary
   :type 'string)
 
@@ -1162,7 +1177,7 @@ Some brain-damaged MUA/MTA, e.g. Lotus Domino 5.0.6 clients, does not
 supply the MIME-Version header or deliberately strip it from the mail.
 If non-nil (the default), Gnus will treat some articles as MIME
 even if the MIME-Version header is missing."
-  :version "21.4"
+  :version "22.1"
   :type 'boolean
   :group 'gnus-article-mime)
 
@@ -1171,7 +1186,7 @@ even if the MIME-Version header is missing."
 This means that Gnus will search message bodies for text that look
 like uuencoded bits, yEncoded bits, and so on, and present that using
 the normal Gnus MIME machinery."
-  :version "21.4"
+  :version "22.1"
   :type 'boolean
   :group 'gnus-article-mime)
 
@@ -1757,6 +1772,7 @@ increase the score of each group you read."
   "Q" gnus-summary-exit-no-update
   "\C-c\C-i" gnus-info-find-node
   gnus-mouse-2 gnus-mouse-pick-article
+  [follow-link] mouse-face
   "m" gnus-summary-mail-other-window
   "a" gnus-summary-post-news
   "i" gnus-summary-news-other-window
@@ -1944,7 +1960,8 @@ increase the score of each group you read."
   "v" gnus-summary-verbose-headers
   "a" gnus-article-strip-headers-in-body ;; mnemonic: wash archive
   "p" gnus-article-verify-x-pgp-sig
-  "d" gnus-article-treat-dumbquotes)
+  "d" gnus-article-treat-dumbquotes
+  "i" gnus-summary-idna-message)
 
 (gnus-define-keys (gnus-summary-wash-deuglify-map "Y" gnus-summary-wash-map)
   ;; mnemonic: deuglif*Y*
@@ -2055,6 +2072,10 @@ increase the score of each group you read."
   "m" gnus-summary-repair-multipart
   "v" gnus-article-view-part
   "o" gnus-article-save-part
+  "O" gnus-article-save-part-and-strip
+  "r" gnus-article-replace-part
+  "d" gnus-article-delete-part
+  "j" gnus-article-jump-to-part
   "c" gnus-article-copy-part
   "C" gnus-article-view-part-as-charset
   "e" gnus-article-view-part-externally
@@ -2267,6 +2288,7 @@ gnus-summary-show-article-from-menu-as-charset-%s" cs))))
              ["Rot 13" gnus-summary-caesar-message
               ,@(if (featurep 'xemacs) '(t)
                   '(:help "\"Caesar rotate\" article by 13"))]
+             ["De-IDNA" gnus-summary-idna-message t]
              ["Morse decode" gnus-summary-morse-message t]
              ["Unix pipe..." gnus-summary-pipe-message t]
              ["Add buttons" gnus-article-add-buttons t]
@@ -2786,7 +2808,7 @@ The following commands are available:
   (make-local-variable 'gnus-summary-mark-positions)
   (gnus-make-local-hook 'pre-command-hook)
   (add-hook 'pre-command-hook 'gnus-set-global-variables nil t)
-  (gnus-run-hooks 'gnus-summary-mode-hook)
+  (gnus-run-mode-hooks 'gnus-summary-mode-hook)
   (turn-on-gnus-mailing-list-mode)
   (mm-enable-multibyte)
   (gnus-update-format-specifications nil 'summary 'summary-mode 'summary-dummy)
@@ -3372,12 +3394,12 @@ buffer that was in action when the last article was fetched."
                newsgroups)
            (cond
             ((setq to (cdr (assq 'To extra-headers)))
-             (concat "-> "
+             (concat gnus-summary-to-prefix
                      (inline
                        (gnus-summary-extract-address-component
                         (funcall gnus-decode-encoded-word-function to)))))
             ((setq newsgroups (cdr (assq 'Newsgroups extra-headers)))
-             (concat "=> " newsgroups)))))
+             (concat gnus-summary-newsgroup-prefix newsgroups)))))
      (inline (gnus-summary-extract-address-component gnus-tmp-from)))))
 
 (defun gnus-summary-insert-line (gnus-tmp-header
@@ -4584,6 +4606,11 @@ using some other form will lead to serious barfage."
                   (or (cdr (assq 'To (mail-header-extra h2))) ""))))
      (or (car extract) (cadr extract)))))
 
+(defun gnus-thread-sort-by-recipient (h1 h2)
+  "Sort threads by root recipient."
+  (gnus-article-sort-by-recipient
+   (gnus-thread-header h1) (gnus-thread-header h2)))
+
 (defsubst gnus-article-sort-by-subject (h1 h2)
   "Sort articles by root subject."
   (string-lessp
@@ -4701,39 +4728,45 @@ Unscored articles will be counted as having a score of zero."
 (defcustom gnus-sum-thread-tree-root "> "
   "With %B spec, used for the root of a thread.
 If nil, use subject instead."
-  :version "21.4"
+  :version "22.1"
   :type '(radio (const :format "%v  " nil) string)
   :group 'gnus-thread)
+
 (defcustom gnus-sum-thread-tree-false-root "> "
   "With %B spec, used for a false root of a thread.
 If nil, use subject instead."
-  :version "21.4"
+  :version "22.1"
   :type '(radio (const :format "%v  " nil) string)
   :group 'gnus-thread)
+
 (defcustom gnus-sum-thread-tree-single-indent ""
   "With %B spec, used for a thread with just one message.
 If nil, use subject instead."
-  :version "21.4"
+  :version "22.1"
   :type '(radio (const :format "%v  " nil) string)
   :group 'gnus-thread)
+
 (defcustom gnus-sum-thread-tree-vertical "| "
   "With %B spec, used for drawing a vertical line."
-  :version "21.4"
+  :version "22.1"
   :type 'string
   :group 'gnus-thread)
+
 (defcustom gnus-sum-thread-tree-indent "  "
   "With %B spec, used for indenting."
-  :version "21.4"
+  :version "22.1"
   :type 'string
   :group 'gnus-thread)
+
 (defcustom gnus-sum-thread-tree-leaf-with-other "+-> "
   "With %B spec, used for a leaf with brothers."
-  :version "21.4"
+  :version "22.1"
   :type 'string
   :group 'gnus-thread)
+
 (defcustom gnus-sum-thread-tree-single-leaf "\\-> "
   "With %B spec, used for a leaf without brothers."
-  :version "21.4"
+  :version "22.1"
   :type 'string
   :group 'gnus-thread)
 
@@ -5156,7 +5189,7 @@ If SELECT-ARTICLES, only select those articles from GROUP."
 
     (when gnus-agent
       (gnus-agent-possibly-alter-active group (gnus-active group) info)
-      
+
       (setq gnus-summary-use-undownloaded-faces
            (gnus-agent-find-parameter
             group
@@ -5718,7 +5751,7 @@ The resulting hash table is returned, or nil if no Xrefs were found."
                                                    (match-end 1)))
                        (substring xrefs (match-beginning 1) (match-end 1))))
          (setq number
-               (string-to-int (substring xrefs (match-beginning 2)
+               (string-to-number (substring xrefs (match-beginning 2)
                                          (match-end 2))))
          (if (setq entry (gnus-gethash group xref-hashtb))
              (setcdr entry (cons number (cdr entry)))
@@ -6426,7 +6459,8 @@ displayed, no centering will be performed."
 (defun gnus-list-of-unread-articles (group)
   (let* ((read (gnus-info-read (gnus-get-info group)))
         (active (or (gnus-active group) (gnus-activate-group group)))
-        (last (cdr active))
+        (last (or (cdr active)
+                  (error "Group %s couldn't be activated " group)))
         first nlast unread)
     ;; If none are read, then all are unread.
     (if (not read)
@@ -6728,6 +6762,10 @@ If FORCE (the prefix), also save the .newsrc file(s)."
       (if quit-config
          (gnus-handle-ephemeral-exit quit-config)
        (goto-char group-point)
+       ;; If gnus-group-buffer is already displayed, make sure we also move
+       ;; the cursor in the window that displays it.
+       (let ((win (get-buffer-window (current-buffer) 0)))
+         (if win (set-window-point win (point))))
        (unless leave-hidden
          (gnus-configure-windows 'group 'force)))
       ;; Clear the current group name.
@@ -7086,7 +7124,7 @@ If optional argument UNREAD is non-nil, only unread article is selected."
       (gnus-summary-goto-subject article t)))
   (gnus-summary-limit (append articles gnus-newsgroup-limit))
   (gnus-summary-position-point))
+
 (defun gnus-summary-goto-subject (article &optional force silent)
   "Go the subject line of ARTICLE.
 If FORCE, also allow jumping to articles not currently shown."
@@ -7290,11 +7328,12 @@ If BACKWARD, the previous article is selected instead of the next."
             (if (and group
                      (not (gnus-ephemeral-group-p gnus-newsgroup-name)))
                 (format " (Type %s for %s [%s])"
-                        (single-key-description cmd) group
+                        (single-key-description cmd)
+                        (gnus-group-decoded-name group)
                         (gnus-group-unread group))
               (format " (Type %s to exit %s)"
                       (single-key-description cmd)
-                      gnus-newsgroup-name))))
+                      (gnus-group-decoded-name gnus-newsgroup-name)))))
       ;; Confirm auto selection.
       (setq key (car (setq keve (gnus-read-event-char prompt)))
            ended t)
@@ -8948,7 +8987,35 @@ forward."
        (let ((start (window-start))
              buffer-read-only)
          (message-caesar-buffer-body arg)
-         (set-window-start (get-buffer-window (current-buffer)) start))))))
+         (set-window-start (get-buffer-window (current-buffer)) start)))))
+  ;; Create buttons and stuff...
+  (gnus-treat-article nil))
+
+(defun gnus-summary-idna-message (&optional arg)
+  "Decode IDNA encoded domain names in the current articles.
+IDNA encoded domain names looks like `xn--bar'.  If a string
+remain unencoded after running this function, it is likely an
+invalid IDNA string (`xn--bar' is invalid).
+
+You must have GNU Libidn (`http://www.gnu.org/software/libidn/')
+installed for this command to work."
+  (interactive "P")
+  (if (not (and (condition-case nil (require 'idna)
+                 (file-error))
+               (mm-coding-system-p 'utf-8)
+               (executable-find (symbol-value 'idna-program))))
+      (gnus-message
+       5 "GNU Libidn not installed properly (`idn' or `idna.el' missing)")
+    (gnus-summary-select-article)
+    (let ((mail-header-separator ""))
+      (gnus-eval-in-buffer-window gnus-article-buffer
+       (save-restriction
+         (widen)
+         (let ((start (window-start))
+               buffer-read-only)
+           (while (re-search-forward "\\(xn--[-0-9a-z]+\\)" nil t)
+             (replace-match (idna-to-unicode (match-string 1))))
+           (set-window-start (get-buffer-window (current-buffer)) start)))))))
 
 (autoload 'unmorse-region "morse"
   "Convert morse coded text in region to ordinary ASCII text."
@@ -9030,7 +9097,7 @@ ACTION can be either `move' (the default), `crosspost' or `copy'."
                 (crosspost "Crosspost" "Crossposting")))
        (copy-buf (save-excursion
                    (nnheader-set-temp-buffer " *copy article*")))
-       art-group to-method new-xref article to-groups)
+       art-group to-method new-xref article to-groups articles-to-update-marks)
     (unless (assq action names)
       (error "Unknown action %s" action))
     ;; Read the newsgroup name.
@@ -9075,6 +9142,11 @@ ACTION can be either `move' (the default), `crosspost' or `copy'."
        ((eq action 'move)
         ;; Remove this article from future suppression.
         (gnus-dup-unsuppress-article article)
+        (let* ((from-method (gnus-find-method-for-group
+                             gnus-newsgroup-name))
+               (to-method (gnus-find-method-for-group
+                           to-newsgroup))
+               (move-is-internal (gnus-method-equal from-method to-method)))
         (gnus-request-move-article
          article                       ; Article to move
          gnus-newsgroup-name           ; From newsgroup
@@ -9083,7 +9155,8 @@ ACTION can be either `move' (the default), `crosspost' or `copy'."
          (list 'gnus-request-accept-article
                to-newsgroup (list 'quote select-method)
                (not articles) t)       ; Accept form
-         (not articles)))              ; Only save nov last time
+         (not articles)                ; Only save nov last time
+         move-is-internal)))           ; is this move internal?
        ;; Copy the article.
        ((eq action 'copy)
         (save-excursion
@@ -9237,13 +9310,15 @@ ACTION can be either `move' (the default), `crosspost' or `copy'."
        (gnus-summary-goto-subject article)
        (when (eq action 'move)
          (gnus-summary-mark-article article gnus-canceled-mark))))
-      (gnus-summary-remove-process-mark article))
+      (push article articles-to-update-marks))
+
+    (apply 'gnus-summary-remove-process-mark articles-to-update-marks)
     ;; Re-activate all groups that have been moved to.
     (save-excursion
       (set-buffer gnus-group-buffer)
       (let ((gnus-group-marked to-groups))
        (gnus-group-get-new-news-this-group nil t)))
-
+    
     (gnus-kill-buffer copy-buf)
     (gnus-summary-position-point)
     (gnus-set-mode-line 'summary)))
@@ -9274,7 +9349,7 @@ If nil, use to the current newsgroup method."
   "If non-nil, show and update the summary buffer as it's being built.
 If the value is t, update the buffer after every line is inserted.  If
 the value is an integer (N), update the display every N lines."
-  :version "21.4"
+  :version "22.1"
   :group 'gnus-thread
   :type '(choice (const :tag "off" nil)
                 number
@@ -9577,7 +9652,8 @@ groups."
           `(lambda ()
              (let ((mbl mml-buffer-list))
                (setq mml-buffer-list nil)
-               (mime-to-mml ,'current-handles)
+               (let ((rfc2047-quote-decoded-words-containing-tspecials t))
+                 (mime-to-mml ,'current-handles))
                (let ((mbl1 mml-buffer-list))
                  (setq mml-buffer-list mbl)
                  (set (make-local-variable 'mml-buffer-list) mbl1))
@@ -9645,7 +9721,8 @@ groups."
            (save-excursion
              (save-restriction
                (message-narrow-to-head)
-               (let ((head (buffer-string))
+               (let ((head (buffer-substring-no-properties
+                            (point-min) (point-max)))
                      header)
                  (with-temp-buffer
                    (insert (format "211 %d Article retrieved.\n"
@@ -9932,13 +10009,14 @@ the actual number of articles marked is returned."
     (gnus-summary-goto-subject article)
     (gnus-summary-update-secondary-mark article)))
 
-(defun gnus-summary-remove-process-mark (article)
-  "Remove the process mark from ARTICLE and update the summary line."
-  (setq gnus-newsgroup-processable (delq article gnus-newsgroup-processable))
-  (when (gnus-summary-goto-subject article)
-    (gnus-summary-show-thread)
-    (gnus-summary-goto-subject article)
-    (gnus-summary-update-secondary-mark article)))
+(defun gnus-summary-remove-process-mark (&rest articles)
+  "Remove the process mark from ARTICLES and update the summary line."
+  (dolist (article articles)
+    (setq gnus-newsgroup-processable (delq article gnus-newsgroup-processable))
+    (when (gnus-summary-goto-subject article)
+      (gnus-summary-show-thread)
+      (gnus-summary-goto-subject article)
+      (gnus-summary-update-secondary-mark article))))
 
 (defun gnus-summary-set-saved-mark (article)
   "Set the process mark on ARTICLE and update the summary line."