(mm-codepage-setup): New helper function.
[gnus] / lisp / gnus-sum.el
index 1bb5b22..f7bd491 100644 (file)
@@ -257,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)
@@ -781,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)
@@ -2073,6 +2073,7 @@ increase the score of each group you read."
   "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
@@ -4605,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
@@ -4725,33 +4731,39 @@ If nil, use subject instead."
   :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 "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 "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 "22.1"
   :type 'string
   :group 'gnus-thread)
+
 (defcustom gnus-sum-thread-tree-indent "  "
   "With %B spec, used for indenting."
   :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 "22.1"
   :type 'string
   :group 'gnus-thread)
+
 (defcustom gnus-sum-thread-tree-single-leaf "\\-> "
   "With %B spec, used for a leaf without brothers."
   :version "22.1"
@@ -7800,8 +7812,8 @@ articles that are younger than AGE days."
           (gnus-completing-read-with-default
            (symbol-name (car gnus-extra-headers))
            (if current-prefix-arg
-               "Exclude extra header:"
-             "Limit extra header:")
+               "Exclude extra header"
+             "Limit extra header")
            (mapcar (lambda (x)
                      (cons (symbol-name x) x))
                    gnus-extra-headers)
@@ -9366,7 +9378,7 @@ latter case, they will be copied into the relevant groups."
                                        gnus-newsgroup-name)))))
                (method
                 (gnus-completing-read-with-default
-                 methname "What backend do you want to use when respooling?"
+                 methname "Backend to use when respooling"
                  methods nil t nil 'gnus-mail-method-history))
                ms)
           (cond
@@ -9709,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"
@@ -11198,7 +11211,7 @@ save those articles instead."
   (let* ((split-name (gnus-get-split-value gnus-move-split-methods))
         (minibuffer-confirm-incomplete nil) ; XEmacs
         (prom
-         (format "%s %s to:"
+         (format "%s %s to"
                  prompt
                  (if (> (length articles) 1)
                      (format "these %d articles" (length articles))