From: yamaoka Date: Tue, 24 Jul 2001 12:37:39 +0000 (+0000) Subject: Synch with Oort Gnus. X-Git-Tag: t-gnus-6_15_4-04-quimby-last-~17 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=3e01a09bde83e4696933f2a2625c686fc45ba1a4;p=elisp%2Fgnus.git- Synch with Oort Gnus. * gnus-clfns.el (copy-list): New compiler macro. --- diff --git a/ChangeLog b/ChangeLog index 5eefb0e..3651fca 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2001-07-24 Katsumi Yamaoka + + * lisp/gnus-clfns.el (copy-list): New compiler macro. + 2001-07-23 Katsumi Yamaoka * lisp/gnus-delay.el (gnus-delay-initialize): Don't use the macro diff --git a/lisp/ChangeLog b/lisp/ChangeLog index cd3a03b..24b4654 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,27 @@ +2001-07-23 22:00:00 ShengHuo ZHU + From Karl Kleinpaste + + * 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 + + * 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 + + * 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 * gnus-start.el (gnus-setup-news): Call diff --git a/lisp/gnus-clfns.el b/lisp/gnus-clfns.el index e70033a..a855553 100644 --- a/lisp/gnus-clfns.el +++ b/lisp/gnus-clfns.el @@ -75,6 +75,17 @@ ((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))) diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index cd9727f..d81cb10 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -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)) diff --git a/lisp/gnus.el b/lisp/gnus.el index c9b7ec1..d0ba95a 100644 --- a/lisp/gnus.el +++ b/lisp/gnus.el @@ -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) diff --git a/lisp/mm-util.el b/lisp/mm-util.el index 48de5ee..8069d34 100644 --- a/lisp/mm-util.el +++ b/lisp/mm-util.el @@ -125,6 +125,7 @@ (setq idx (1+ idx))) string))) (string-as-unibyte . identity) + (string-as-multibyte . identity) (multibyte-string-p . ignore)))) (eval-and-compile @@ -199,6 +200,9 @@ (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: diff --git a/lisp/nnmh.el b/lisp/nnmh.el index 1b660f9..e2d56b7 100644 --- a/lisp/nnmh.el +++ b/lisp/nnmh.el @@ -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) diff --git a/texi/ChangeLog b/texi/ChangeLog index 9653969..82b774c 100644 --- a/texi/ChangeLog +++ b/texi/ChangeLog @@ -1,3 +1,8 @@ +2001-07-23 22:00:00 ShengHuo ZHU + From Karl Kleinpaste + + * gnus.texi (Summary Buffer Lines): Add %B. + 2001-07-20 11:00:00 ShengHuo ZHU From Jesper Harder diff --git a/texi/gnus-ja.texi b/texi/gnus-ja.texi index 317f8bc..ea04c40 100644 --- a/texi/gnus-ja.texi +++ b/texi/gnus-ja.texi @@ -4022,6 +4022,9 @@ Gnus は変数 @code{gnus-extract-address-components} の値を @code{From サポートしません。 @item I スレッドのレベルによる字下げ (@pxref{Customizing Threading})。 +@item B +複雑な trn 様式のスレッド木 (tree)。どのような応答が行なわれたかの記録を +表示します。 @item T 記事が本記事であれば何も表示せず、そうでない場合はたくさんの空白です (後 のものをすべて画面の外に追い出してしまいます)。 diff --git a/texi/gnus.texi b/texi/gnus.texi index 26179c9..0b4ef32 100644 --- a/texi/gnus.texi +++ b/texi/gnus.texi @@ -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).