Synch with Oort Gnus.
authoryamaoka <yamaoka>
Tue, 24 Jul 2001 12:37:39 +0000 (12:37 +0000)
committeryamaoka <yamaoka>
Tue, 24 Jul 2001 12:37:39 +0000 (12:37 +0000)
* gnus-clfns.el (copy-list): New compiler macro.

ChangeLog
lisp/ChangeLog
lisp/gnus-clfns.el
lisp/gnus-sum.el
lisp/gnus.el
lisp/mm-util.el
lisp/nnmh.el
texi/ChangeLog
texi/gnus-ja.texi
texi/gnus.texi

index 5eefb0e..3651fca 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2001-07-24  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * lisp/gnus-clfns.el (copy-list): New compiler macro.
+
 2001-07-23  Katsumi Yamaoka  <yamaoka@jpl.org>
 
        * lisp/gnus-delay.el (gnus-delay-initialize): Don't use the macro
index cd3a03b..24b4654 100644 (file)
@@ -1,3 +1,27 @@
+2001-07-23 22:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
+       From Karl Kleinpaste <karl@charcoal.com>
+
+       * gnus-sum.el (gnus-summary-line-format-alist): Add %B.
+       (gnus-summary-prepare-threads): Ditto.
+
+       * gnus.el (gnus-summary-line-format): Add %B.
+
+2001-07-23 19:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
+
+       * gnus-sum.el (gnus-articles-to-read): Use gnus-group-decoded-name.
+
+       * mm-util.el (mm-string-as-multibyte): New.
+
+       * nnmh.el (nnmh-request-list-1): Encode, not decode!
+
+2001-07-23 18:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
+
+       * mm-util.el (mm-universal-coding-system): New.
+
+       * gnus-start.el (gnus-startup-file-coding-system): Use it.
+
+       * score-mode.el (score-mode-coding-system): Use it.
+
 2001-07-23  Katsumi Yamaoka  <yamaoka@jpl.org>
 
        * gnus-start.el (gnus-setup-news): Call
index e70033a..a855553 100644 (file)
               ((typep x type) x)
               (t (error "Can't coerce %s to type %s" x type))))))
 
+  (define-compiler-macro copy-list (&whole form list)
+    (if (and (fboundp 'copy-list)
+            (subrp (symbol-function 'copy-list)))
+       form
+      `(let ((list ,list))
+        (if (consp list)
+            (let ((res nil))
+              (while (consp list) (push (pop list) res))
+              (prog1 (nreverse res) (setcdr res list)))
+          (car list)))))
+
   (define-compiler-macro last (&whole form x &optional n)
     (if (and (fboundp 'last)
             (subrp (symbol-function 'last)))
index cd9727f..d81cb10 100644 (file)
@@ -1118,7 +1118,8 @@ that were fetched.  Say, for nnultimate groups."
         (and (boundp 'thread) (car thread)) gnus-tmp-level t)
        ?c)
     (?u gnus-tmp-user-defined ?s)
-    (?P (gnus-pick-line-number) ?d))
+    (?P (gnus-pick-line-number) ?d)
+    (?B gnus-tmp-thread-tree-header-string ?s))
   "An alist of format specifications that can appear in summary lines.
 These are paired with what variables they correspond with, along with
 the type of the variable (string, integer, character, etc).")
@@ -4116,6 +4117,15 @@ Unscored articles will be counted as having a score of zero."
   (or (cdr (assq type (mail-header-extra (or header gnus-tmp-header))))
       ""))
 
+(defvar gnus-tmp-thread-tree-header-string "")
+
+(defvar gnus-sum-thread-tree-root "> ")
+(defvar gnus-sum-thread-tree-single-indent "")
+(defvar gnus-sum-thread-tree-vertical "| ")
+(defvar gnus-sum-thread-tree-indent "  ")
+(defvar gnus-sum-thread-tree-leaf-with-other "+-> ")
+(defvar gnus-sum-thread-tree-single-leaf "\\-> ")
+
 (defun gnus-summary-prepare-threads (threads)
   "Prepare summary buffer from THREADS and indentation LEVEL.
 THREADS is either a list of `(PARENT [(CHILD1 [(GRANDCHILD ...]...) ...])'
@@ -4134,7 +4144,8 @@ or a straight list of headers."
        gnus-tmp-replied gnus-tmp-subject-or-nil
        gnus-tmp-dummy gnus-tmp-indentation gnus-tmp-lines gnus-tmp-score
        gnus-tmp-score-char gnus-tmp-from gnus-tmp-name
-       gnus-tmp-number gnus-tmp-opening-bracket gnus-tmp-closing-bracket)
+       gnus-tmp-number gnus-tmp-opening-bracket gnus-tmp-closing-bracket
+        tree-stack)
 
     (setq gnus-tmp-prev-subject nil)
 
@@ -4172,7 +4183,8 @@ or a straight list of headers."
            ;; the stack.
            (setq state (car stack)
                  gnus-tmp-level (car state)
-                 thread (cdr state)
+                  tree-stack (cadr state)
+                 thread (caddr state)
                  stack (cdr stack)
                  gnus-tmp-header (caar thread))))
 
@@ -4339,7 +4351,22 @@ or a straight list of headers."
              ((string-match "(.+)" gnus-tmp-from)
               (substring gnus-tmp-from
                          (1+ (match-beginning 0)) (1- (match-end 0))))
-             (t gnus-tmp-from)))
+             (t gnus-tmp-from))
+             gnus-tmp-thread-tree-header-string 
+             (if (zerop gnus-tmp-level)
+                 (if (cdar thread) 
+                     gnus-sum-thread-tree-root
+                   gnus-sum-thread-tree-single-indent)
+               (concat (apply 'concat
+                              (mapcar (lambda (item) 
+                                        (if (= item 1) 
+                                            gnus-sum-thread-tree-vertical
+                                          gnus-sum-thread-tree-indent))
+                                      (cdr (reverse tree-stack))))
+                       (if (nth 1 thread) 
+                           gnus-sum-thread-tree-leaf-with-other
+                         gnus-sum-thread-tree-single-leaf))))
+
            (when (string= gnus-tmp-name "")
              (setq gnus-tmp-name gnus-tmp-from))
            (unless (numberp gnus-tmp-lines)
@@ -4358,7 +4385,11 @@ or a straight list of headers."
            (setq gnus-tmp-prev-subject subject)))
 
        (when (nth 1 thread)
-         (push (cons (max 0 gnus-tmp-level) (nthcdr 1 thread)) stack))
+         (push (list (max 0 gnus-tmp-level) 
+                      (copy-list tree-stack)
+                      (nthcdr 1 thread))
+                stack))        
+        (push (if (nth 1 thread) 1 0) tree-stack)
        (incf gnus-tmp-level)
        (setq threads (if thread-end nil (cdar thread)))
        (unless threads
@@ -4614,13 +4645,16 @@ If SELECT-ARTICLES, only select those articles from GROUP."
                       (natnump gnus-large-newsgroup)
                       (> number gnus-large-newsgroup))
                  (let* ((cursor-in-echo-area nil)
-                        (input (read-from-minibuffer
-                                (format
-                                 "How many articles from %s (max %d): "
-                                 (gnus-limit-string gnus-newsgroup-name 35)
-                                 number)
-                                (cons (number-to-string gnus-large-newsgroup)
-                                      0))))
+                        (input
+                         (read-from-minibuffer
+                          (format
+                           "How many articles from %s (max %d): "
+                           (gnus-limit-string
+                            (gnus-group-decoded-name gnus-newsgroup-name)
+                            35)
+                           number)
+                          (cons (number-to-string gnus-large-newsgroup)
+                                0))))
                    (if (string-match "^[ \t]*$" input)
                        number
                      input)))
@@ -4630,7 +4664,8 @@ If SELECT-ARTICLES, only select those articles from GROUP."
                         (read-string
                          (format "%s %s (%d scored, %d total): "
                                  "How many articles from"
-                                 group scored number))))
+                                 (gnus-group-decoded-name group)
+                                  scored number))))
                    (if (string-match "^[ \t]*$" input)
                        number input)))
                 (t number))
index c9b7ec1..d0ba95a 100644 (file)
@@ -2162,6 +2162,7 @@ with some simple extensions.
 %c   Number of characters in the article (integer)
 %L   Number of lines in the article (integer)
 %I   Indentation based on thread level (a string of spaces)
+%B   A complex trn-style thread tree (string)
 %T   A string with two possible values: 80 spaces if the article
      is on thread level two or larger and 0 spaces on level one
 %R   \"A\" if this article has been replied to, \" \" otherwise (character)
index 48de5ee..8069d34 100644 (file)
              (setq idx (1+ idx)))
            string)))
      (string-as-unibyte . identity)
+     (string-as-multibyte . identity)
      (multibyte-string-p . ignore))))
 
 (eval-and-compile
    (t mm-binary-coding-system))
   "Coding system of auto save file.")
 
+(defvar mm-universal-coding-system mm-auto-save-coding-system
+  "The universal Coding system.")
+
 ;;; Internal variables:
 
 ;;; Functions:
index 1b660f9..e2d56b7 100644 (file)
@@ -271,10 +271,12 @@ as unread by Gnus.")
                (file-truename (file-name-as-directory
                                (expand-file-name nnmh-toplev))))
               dir)
-             (nnheader-replace-chars-in-string
-              (decode-coding-string (substring dir (match-end 0))
-                                    nnmail-pathname-coding-system)
-              ?/ ?.))
+             (string-as-multibyte
+              (encode-coding-string
+               (nnheader-replace-chars-in-string
+                (substring dir (match-end 0))
+                ?/ ?.)
+               nnmail-pathname-coding-system)))
            (apply 'max files)
            (apply 'min files)))))))
   t)
index 9653969..82b774c 100644 (file)
@@ -1,3 +1,8 @@
+2001-07-23 22:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
+       From Karl Kleinpaste <karl@charcoal.com>
+
+       * gnus.texi (Summary Buffer Lines): Add %B.
+
 2001-07-20 11:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
        From Jesper Harder <harder@myrealbox.com>
 
index 317f8bc..ea04c40 100644 (file)
@@ -4022,6 +4022,9 @@ Gnus \e$B$OJQ?t\e(B @code{gnus-extract-address-components} \e$B$NCM$r\e(B @code{From
 \e$B%5%]!<%H$7$^$;$s!#\e(B
 @item I
 \e$B%9%l%C%I$N%l%Y%k$K$h$k;z2<$2\e(B (@pxref{Customizing Threading})\e$B!#\e(B
+@item B
+\e$BJ#;($J\e(B trn \e$BMM<0$N%9%l%C%ILZ\e(B (tree)\e$B!#$I$N$h$&$J1~Ez$,9T$J$o$l$?$+$N5-O?$r\e(B
+\e$BI=<($7$^$9!#\e(B
 @item T
 \e$B5-;v$,K\5-;v$G$"$l$P2?$bI=<($;$:!"$=$&$G$J$$>l9g$O$?$/$5$s$N6uGr$G$9\e(B (\e$B8e\e(B
 \e$B$N$b$N$r$9$Y$F2hLL$N30$KDI$$=P$7$F$7$^$$$^$9\e(B)\e$B!#\e(B
index 26179c9..0b4ef32 100644 (file)
@@ -4043,6 +4043,8 @@ Number of characters in the article. This specifier is not supported in some
 methods (like nnfolder).
 @item I
 Indentation based on thread level (@pxref{Customizing Threading}).
+@item B
+A complex trn-style thread tree, showing response-connecting trace lines.
 @item T
 Nothing if the article is a root and lots of spaces if it isn't (it
 pushes everything after it off the screen).