Merge from gnus--rel--5.10
authorMiles Bader <miles@gnu.org>
Tue, 12 Dec 2006 07:29:44 +0000 (07:29 +0000)
committerMiles Bader <miles@gnu.org>
Tue, 12 Dec 2006 07:29:44 +0000 (07:29 +0000)
Patches applied:

 * emacs--devo--0  (patch 548, 550, 553)

   - Update from CVS
   - Merge from gnus--rel--5.10

 * gnus--rel--5.10  (patch 173)

   - Merge from emacs--devo--0

2006-12-08  Chong Yidong  <cyd@stupidchicken.com>

   * lisp/gnus-sum.el (gnus-make-thread-indent-array): New optional arg
   specifying array size.
   (gnus-summary-insert-line, gnus-summary-prepare-threads): Regrow indent
   array if it is too small.
   (gnus-sort-threads-recursive): Renamed from gnus-sort-thread-1.
   (gnus-sort-threads-loop): New function.

Revision: emacs@sv.gnu.org/gnus--devo--0--patch-252

29 files changed:
lisp/ChangeLog
lisp/ChangeLog.2
lisp/format-spec.el
lisp/gnus-async.el
lisp/gnus-audio.el
lisp/gnus-demon.el
lisp/gnus-dup.el
lisp/gnus-kill.el
lisp/gnus-mh.el
lisp/gnus-move.el
lisp/gnus-nocem.el
lisp/gnus-soup.el
lisp/gnus-sum.el
lisp/gnus-undo.el
lisp/mail-parse.el
lisp/mail-prsvr.el
lisp/messcompat.el
lisp/nndir.el
lisp/nnkiboze.el
lisp/nnlistserv.el
lisp/nnspool.el
lisp/nnwarchive.el
lisp/rfc1843.el
lisp/rfc2045.el
lisp/rfc2047.el
lisp/rfc2104.el
lisp/rfc2231.el
lisp/starttls.el
lisp/utf7.el

index 6dd00f9..98ea307 100644 (file)
@@ -5,6 +5,15 @@
        * gnus-sum.el (gnus-summary-recenter): Force setting the window start
        to make it work reliably in CVS Emacs.
 
+2006-12-08  Chong Yidong  <cyd@stupidchicken.com>
+
+       * gnus-sum.el (gnus-make-thread-indent-array): New optional arg
+       specifying array size.
+       (gnus-summary-insert-line, gnus-summary-prepare-threads): Regrow indent
+       array if it is too small.
+       (gnus-sort-threads-recursive): Renamed from gnus-sort-thread-1.
+       (gnus-sort-threads-loop): New function.
+
 2006-12-06  Chris Moore  <dooglus@gmail.com>  (tiny change)
 
        * gnus-sum.el (gnus-sort-threads, gnus-summary-limit-children):
index 14b4c23..dcd6e82 100644 (file)
 
 See ChangeLog.1 for earlier changes.
 
-    Copyright (C) 2000, 2001, 2002, 2004 Free Software Foundation, Inc.
+    Copyright (C) 2000, 2001, 2002, 2004, 2005, 2006
+    Free Software Foundation, Inc.
   Copying and distribution of this file, with or without modification,
   are permitted provided the copyright notice and this notice are preserved.
 
index aa290be..74bf091 100644 (file)
@@ -1,6 +1,6 @@
 ;;; format-spec.el --- functions for formatting arbitrary formatting strings
 
-;; Copyright (C) 1999, 2000, 2002, 2003, 2004,
+;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004,
 ;;   2005, 2006 Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
index 3e8e316..e828349 100644 (file)
@@ -1,6 +1,6 @@
 ;;; gnus-async.el --- asynchronous support for Gnus
 
-;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2002, 2003, 2004,
+;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
 ;;   2005, 2006 Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
index be10019..a3192d8 100644 (file)
@@ -1,6 +1,6 @@
 ;;; gnus-audio.el --- Sound effects for Gnus
 
-;; Copyright (C) 1996, 2000, 2002, 2003, 2004,
+;; Copyright (C) 1996, 2000, 2001, 2002, 2003, 2004,
 ;;   2005, 2006 Free Software Foundation, Inc.
 
 ;; Author: Steven L. Baur <steve@miranova.com>
index 1137ab2..4569ccb 100644 (file)
@@ -1,6 +1,6 @@
 ;;; gnus-demon.el --- daemonic Gnus behaviour
 
-;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2003, 2004,
+;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
 ;;   2005, 2006 Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
index bdff653..d4e8a24 100644 (file)
@@ -1,6 +1,6 @@
 ;;; gnus-dup.el --- suppression of duplicate articles in Gnus
 
-;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2002, 2003, 2004,
+;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
 ;;   2005, 2006 Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
index 97b5ec5..7a18ab8 100644 (file)
@@ -1,6 +1,6 @@
 ;;; gnus-kill.el --- kill commands for Gnus
 
-;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004,
+;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
 ;;   2005, 2006 Free Software Foundation, Inc.
 
 ;; Author: Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
index 34c310f..3c3dd50 100644 (file)
@@ -1,6 +1,6 @@
 ;;; gnus-mh.el --- mh-e interface for Gnus
 
-;; Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2003,
+;; Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
 ;;   2004, 2005, 2006 Free Software Foundation, Inc.
 
 ;; Author: Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
index 9cecb2f..cee82bc 100644 (file)
@@ -1,6 +1,6 @@
 ;;; gnus-move.el --- commands for moving Gnus from one server to another
 
-;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2002, 2003, 2004,
+;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
 ;;   2005, 2006 Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
index f40bdba..00c8184 100644 (file)
@@ -1,6 +1,6 @@
 ;;; gnus-nocem.el --- NoCeM pseudo-cancellation treatment
 
-;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2003, 2004,
+;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
 ;;   2005, 2006 Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
index cca3159..70a17da 100644 (file)
@@ -1,6 +1,6 @@
 ;;; gnus-soup.el --- SOUP packet writing support for Gnus
 
-;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2003, 2004,
+;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
 ;;   2005, 2006 Free Software Foundation, Inc.
 
 ;; Author: Per Abrahamsen <abraham@iesd.auc.dk>
index 195d466..11e84c2 100644 (file)
@@ -3443,16 +3443,17 @@ buffer that was in action when the last article was fetched."
       t
     (not (cdr (gnus-data-find-list article)))))
 
-(defun gnus-make-thread-indent-array ()
-  (let ((n 200))
-    (unless (and gnus-thread-indent-array
-                (= gnus-thread-indent-level gnus-thread-indent-array-level))
-      (setq gnus-thread-indent-array (make-vector 201 "")
-           gnus-thread-indent-array-level gnus-thread-indent-level)
-      (while (>= n 0)
-       (aset gnus-thread-indent-array n
-             (make-string (* n gnus-thread-indent-level) ? ))
-       (setq n (1- n))))))
+(defun gnus-make-thread-indent-array (&optional n)
+  (when (or n
+           (progn (setq n 200) nil)
+           (null gnus-thread-indent-array)
+           (/= gnus-thread-indent-level gnus-thread-indent-array-level))
+    (setq gnus-thread-indent-array (make-vector (1+ n) "")
+         gnus-thread-indent-array-level gnus-thread-indent-level)
+    (while (>= n 0)
+      (aset gnus-thread-indent-array n
+           (make-string (* n gnus-thread-indent-level) ?\s))
+      (setq n (1- n)))))
 
 (defun gnus-update-summary-mark-positions ()
   "Compute where the summary marks are to go."
@@ -3558,6 +3559,9 @@ buffer that was in action when the last article was fetched."
                                 gnus-tmp-expirable gnus-tmp-subject-or-nil
                                 &optional gnus-tmp-dummy gnus-tmp-score
                                 gnus-tmp-process)
+  (if (>= gnus-tmp-level (length gnus-thread-indent-array))
+      (gnus-make-thread-indent-array (max (* 2 (length gnus-thread-indent-array))
+                                         gnus-tmp-level)))
   (let* ((gnus-tmp-indentation (aref gnus-thread-indent-array gnus-tmp-level))
         (gnus-tmp-lines (mail-header-lines gnus-tmp-header))
         (gnus-tmp-score (or gnus-tmp-score gnus-summary-default-score 0))
@@ -4650,23 +4654,46 @@ If LINE, insert the rebuilt thread starting on line LINE."
              (1+ (point-at-eol))
            (gnus-delete-line)))))))
 
-(defun gnus-sort-threads-1 (threads func)
+(defun gnus-sort-threads-recursive (threads func)
   (sort (mapcar (lambda (thread)
                  (cons (car thread)
                        (and (cdr thread)
-                            (gnus-sort-threads-1 (cdr thread) func))))
+                            (gnus-sort-threads-recursive (cdr thread) func))))
                threads) func))
 
+(defun gnus-sort-threads-loop (threads func)
+  (let* ((superthread (cons nil threads))
+        (stack (list (cons superthread threads)))
+        remaining-threads thread)
+    (while stack
+      (setq remaining-threads (cdr (car stack)))
+      (if remaining-threads
+         (progn (setq thread (car remaining-threads))
+                (setcdr (car stack) (cdr remaining-threads))
+                (if (cdr thread)
+                    (push (cons thread (cdr thread)) stack)))
+       (setq thread (caar stack))
+       (setcdr thread (sort (cdr thread) func))
+       (pop stack)))
+    (cdr superthread)))
+
 (defun gnus-sort-threads (threads)
   "Sort THREADS."
   (if (not gnus-thread-sort-functions)
       threads
     (gnus-message 8 "Sorting threads...")
-    (let ((max-lisp-eval-depth (max 5000 max-lisp-eval-depth)))
-      (prog1 (gnus-sort-threads-1
-        threads
-        (gnus-make-sort-function gnus-thread-sort-functions))
-        (gnus-message 8 "Sorting threads...done")))))
+    (prog1
+       (condition-case nil
+           (let ((max-lisp-eval-depth (max max-lisp-eval-depth 5000)))
+             (gnus-sort-threads-recursive
+              threads (gnus-make-sort-function gnus-thread-sort-functions)))
+         ;; Even after binding max-lisp-eval-depth, the recursive
+         ;; sorter might fail for very long threads.  In that case,
+         ;; try using a (less well-tested) non-recursive sorter.
+         (error (gnus-sort-threads-loop
+                 threads (gnus-make-sort-function
+                          gnus-thread-sort-functions))))
+      (gnus-message 8 "Sorting threads...done"))))
 
 (defun gnus-sort-articles (articles)
   "Sort ARTICLES."
@@ -5114,6 +5141,10 @@ or a straight list of headers."
                      gnus-tmp-closing-bracket ?\>)
              (setq gnus-tmp-opening-bracket ?\[
                    gnus-tmp-closing-bracket ?\]))
+           (if (>= gnus-tmp-level (length gnus-thread-indent-array))
+               (gnus-make-thread-indent-array
+                (max (* 2 (length gnus-thread-indent-array))
+                     gnus-tmp-level)))
            (setq
             gnus-tmp-indentation
             (aref gnus-thread-indent-array gnus-tmp-level)
index fcb0fd9..8e8ca2f 100644 (file)
@@ -1,6 +1,6 @@
 ;;; gnus-undo.el --- minor mode for undoing in Gnus
 
-;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2002, 2003, 2004,
+;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
 ;;   2005, 2006 Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
index 9593b43..4280a21 100644 (file)
@@ -1,6 +1,6 @@
 ;;; mail-parse.el --- Interface functions for parsing mail
 
-;; Copyright (C) 1998, 1999, 2000, 2002, 2003, 2004,
+;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004,
 ;;   2005, 2006 Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
index 144d61e..9cb214d 100644 (file)
@@ -1,6 +1,6 @@
 ;;; mail-prsvr.el --- Interface variables for parsing mail
 
-;; Copyright (C) 1999, 2000, 2002, 2003, 2004,
+;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004,
 ;;   2005, 2006 Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
index f7b06f6..1c56d5d 100644 (file)
@@ -1,6 +1,6 @@
 ;;; messcompat.el --- making message mode compatible with mail mode
 
-;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2002, 2003, 2004,
+;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
 ;;   2005, 2006 Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
index ec47c94..e821107 100644 (file)
@@ -1,6 +1,6 @@
 ;;; nndir.el --- single directory newsgroup access for Gnus
 
-;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2003, 2004,
+;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
 ;;   2005, 2006 Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
index 9e176f3..f676fc1 100644 (file)
@@ -1,6 +1,6 @@
 ;;; nnkiboze.el --- select virtual news access for Gnus
 
-;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2003, 2004,
+;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
 ;;   2005, 2006 Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
index 3ee8f42..2c77b02 100644 (file)
@@ -1,6 +1,6 @@
 ;;; nnlistserv.el --- retrieving articles via web mailing list archives
 
-;; Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003, 2004,
+;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
 ;;   2005, 2006 Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
index 33ed7f8..9caa7e2 100644 (file)
@@ -1,7 +1,7 @@
 ;;; nnspool.el --- spool access for GNU Emacs
 
 ;; Copyright (C) 1988, 1989, 1990, 1993, 1994, 1995, 1996, 1997, 1998,
-;;   2000, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+;;   2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
 
 ;; Author: Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
 ;;     Lars Magne Ingebrigtsen <larsi@gnus.org>
index 13a2241..c110553 100644 (file)
@@ -1,6 +1,6 @@
 ;;; nnwarchive.el --- interfacing with web archives
 
-;; Copyright (C) 1999, 2000, 2002, 2003, 2004,
+;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004,
 ;;   2005, 2006 Free Software Foundation, Inc.
 
 ;; Author: Shenghuo Zhu <zsh@cs.rochester.edu>
index aac7575..527769d 100644 (file)
@@ -1,6 +1,6 @@
 ;;; rfc1843.el --- HZ (rfc1843) decoding
 
-;; Copyright (C) 1998, 1999, 2000, 2002, 2003, 2004,
+;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004,
 ;;   2005, 2006 Free Software Foundation, Inc.
 
 ;; Author: Shenghuo Zhu <zsh@cs.rochester.edu>
index f38ec05..d41af59 100644 (file)
@@ -1,6 +1,6 @@
 ;;; rfc2045.el --- Functions for decoding rfc2045 headers
 
-;; Copyright (C) 1998, 1999, 2000, 2002, 2003, 2004,
+;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004,
 ;;   2005, 2006 Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
index b3a9c2d..09de21a 100644 (file)
@@ -1,6 +1,6 @@
 ;;; rfc2047.el --- functions for encoding and decoding rfc2047 messages
 
-;; Copyright (C) 1998, 1999, 2000, 2002, 2003, 2004,
+;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004,
 ;;   2005, 2006 Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
index 87a2167..e24506e 100644 (file)
@@ -1,6 +1,6 @@
 ;;; rfc2104.el --- RFC2104 Hashed Message Authentication Codes
 
-;; Copyright (C) 1998, 1999, 2000, 2002, 2003, 2004,
+;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004,
 ;;   2005, 2006 Free Software Foundation, Inc.
 
 ;; Author: Simon Josefsson <jas@pdc.kth.se>
index 6c08154..05a2d96 100644 (file)
@@ -1,6 +1,6 @@
 ;;; rfc2231.el --- Functions for decoding rfc2231 headers
 
-;; Copyright (C) 1998, 1999, 2000, 2002, 2003, 2004, 2005,
+;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
 ;;   2006 Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
index a9b64b4..229d6dc 100644 (file)
@@ -1,6 +1,6 @@
 ;;; starttls.el --- STARTTLS functions
 
-;; Copyright (C) 1999, 2000, 2002, 2003, 2004,
+;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004,
 ;;   2005, 2006 Free Software Foundation, Inc.
 
 ;; Author: Daiki Ueno <ueno@unixuser.org>
index a1b7fdc..8c76160 100644 (file)
@@ -1,6 +1,6 @@
 ;;; utf7.el --- UTF-7 encoding/decoding for Emacs   -*-coding: iso-8859-1;-*-
 
-;; Copyright (C) 1999, 2000, 2002, 2003, 2004,
+;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004,
 ;;   2005, 2006 Free Software Foundation, Inc.
 
 ;; Author: Jon K Hellan <hellan@acm.org>