From 2691a76408932d6b0b1c5bd99aa3a2a20831b86d Mon Sep 17 00:00:00 2001 From: yoichi Date: Fri, 7 Dec 2001 11:35:37 +0000 Subject: [PATCH] Change bahavior of wl-summary-width and wl-summary-indent-length-limit. Change variables name: wl-from-width -> wl-summary-from-width wl-subject-length-limit -> wl-summary-subject-length-limit --- doc/wl-ja.texi | 41 ++++++++++++++++++++++++----------------- doc/wl.texi | 43 +++++++++++++++++++++++++------------------ samples/en/dot.wl | 6 +++++- samples/ja/dot.wl | 4 ++++ wl/ChangeLog | 16 ++++++++++++++++ wl/wl-summary.el | 19 +++++++++---------- wl/wl-thread.el | 7 +++---- wl/wl-vars.el | 9 +++++---- 8 files changed, 91 insertions(+), 54 deletions(-) diff --git a/doc/wl-ja.texi b/doc/wl-ja.texi index f69ef3f..d2a2cbf 100644 --- a/doc/wl-ja.texi +++ b/doc/wl-ja.texi @@ -3510,16 +3510,6 @@ Non-nil なら、@samp{^L} で改ページしてメッセージを表示します。 初期設定は '(1 . 4)。 サマリを表示するウィンドウとメッセージ本体を表示するウィンドウの比を cons で指定します。car:cdr が サマリ:メッセージ です。 -@item wl-summary-recenter -@vindex wl-summary-recenter -初期設定は @code{t}。Non-nil ならば表示したときに表示中のメッセージのサ -マリ行をウィンドウの中央付近に移動させます。 - -@item wl-summary-indent-length-limit -@vindex wl-summary-indent-length-limit -初期設定は 46。設定された値以上サマリをインデントしません。@code{nil} な -らサマリのインデントを無制限にします。 - @item wl-summary-no-from-message @vindex wl-summary-no-from-message 初期設定は @samp{nobody@@nowhere?}。 @@ -3530,11 +3520,6 @@ Non-nil なら、@samp{^L} で改ページしてメッセージを表示します。 初期設定は @samp{(WL:No Subject in original.)}。メッセージに @samp{Subject:} が無かった場合にサマリに表示する文字列です。 -@item wl-summary-width -@vindex wl-summary-width -初期設定は 80。サマリの表示幅を設定された値に切り詰めます。@code{nil} な -ら表示幅を切り詰めません。 - @item wl-summary-use-frame @vindex wl-summary-use-frame 初期設定は @code{nil}。 @@ -3571,10 +3556,32 @@ petname でも補完ができます。 @kbd{n}, @kbd{N} の結果で、次のメッセージが上か下かを切り替える。読んで いる方向を意識したいときは @code{t} にすると良いでしょう。 -@item wl-from-width -@vindex wl-from-width +@item wl-summary-width +@vindex wl-summary-width +初期設定は 80。サマリの表示幅を設定された値に切り詰めます。@code{nil} な +ら表示幅を切り詰めません。 + +@item wl-summary-from-width +@vindex wl-summary-from-width 初期設定は 17。サマリの From 部分の表示幅です。 +@item wl-summary-subject-length-limit +@vindex wl-summary-subject-length-limit +初期設定は @code{nil}。サマリの Subject 部分の表示幅の上限です。 +@code{nil} の場合、Subject 部分の長さの制限をしません。 + +@item wl-summary-indent-length-limit +@vindex wl-summary-indent-length-limit +初期設定は 46。設定された値以上サマリをインデントしません。@code{nil} な +らサマリのインデントを無制限にします。 +値を @code{nil} にするときは、@code{wl-summary-width} も @code{nil} に設定 +するとよいでしょう。 + +@item wl-summary-recenter +@vindex wl-summary-recenter +初期設定は @code{t}。Non-nil ならば表示したときに表示中のメッセージのサ +マリ行をウィンドウの中央付近に移動させます。 + @item wl-summary-divide-thread-when-subject-changed @vindex wl-summary-divide-thread-when-subject-changed 初期設定は @code{nil}。 diff --git a/doc/wl.texi b/doc/wl.texi index 7d313aa..1435fef 100644 --- a/doc/wl.texi +++ b/doc/wl.texi @@ -3521,17 +3521,6 @@ The initial setting is '(1 . 4). A cons cell to specify the rate of summary and message window. car:cdr corresponds summary:message. -@item wl-summary-recenter -@vindex wl-summary-recenter -The initial setting is t. -If non-nil, cursor point is moved to the center of the summary window. - -@item wl-summary-indent-length-limit -@vindex wl-summary-indent-length-limit -The initial setting is 46. -Specify the limit of thread indent level. -If nil, max indent level is unlimited. - @item wl-summary-no-from-message @vindex wl-summary-no-from-message The initial setting is @samp{nobody@@nowhere?}. A string which is @@ -3542,11 +3531,6 @@ displayed when there's no @samp{From:} field in the message. The initial setting is @samp{(WL:No Subject in original.)}. A string which is displayed when there's no @samp{Subject:} field in the message. -@item wl-summary-width -@vindex wl-summary-width -The initial setting is 80. -Width of summary line. If @code{nil}, summary line's width is as is. - @item wl-summary-use-frame @vindex wl-summary-use-frame The initial setting is @code{nil}. @@ -3583,11 +3567,34 @@ The initial setting is @code{t}. If non-nil, last executed @kbd{p}, @kbd{P}, @kbd{n}, @kbd{N} toggles the direction of cursor move. If you want to aware of reading direction, set this to @code{t}. -@item wl-from-width -@vindex wl-from-width +@item wl-summary-width +@vindex wl-summary-width +The initial setting is 80. +Width of summary line. If @code{nil}, summary line's width is as is. + +@item wl-summary-from-width +@vindex wl-summary-from-width The initial setting is 17. Width of sender part of summary line. +@item wl-summary-subject-length-limit +@vindex wl-summary-subject-length-limit +The initial setting is @code{nil}. Specify the limit for the length of +subject parts in summary. @code{nil} means unlimited. + +@item wl-summary-indent-length-limit +@vindex wl-summary-indent-length-limit +The initial setting is 46. +Specify the limit of thread indent level. @code{nil} means unlimited +indent level. +If you set this to @code{nil} you should set @code{wl-summary-width} +to @code{nil}, too. + +@item wl-summary-recenter +@vindex wl-summary-recenter +The initial setting is t. +If non-nil, cursor point is moved to the center of the summary window. + @item wl-summary-divide-thread-when-subject-changed @vindex wl-summary-divide-thread-when-subject-changed The initial setting is @code{nil}. If non-nil, thread is split if diff --git a/samples/en/dot.wl b/samples/en/dot.wl index 8603cb0..0aa8be4 100644 --- a/samples/en/dot.wl +++ b/samples/en/dot.wl @@ -109,10 +109,14 @@ ;; Open new frame for draft buffer. ;(setq wl-draft-use-frame t) +;; Don't limit indent for thread view +;(setq wl-summary-indent-length-limit nil) +;(setq wl-summary-width nil) + ;; Divide thread by change of subject. ;(setq wl-summary-divide-thread-when-subject-changed t) -;; Thread view +;; Change format of thread view ;(setq wl-thread-indent-level 2) ;(setq wl-thread-have-younger-brother-str "+" ; wl-thread-youngest-child-str "+" diff --git a/samples/ja/dot.wl b/samples/ja/dot.wl index 57fc7a6..6b86faa 100644 --- a/samples/ja/dot.wl +++ b/samples/ja/dot.wl @@ -108,6 +108,10 @@ ;; ドラフトを新しいフレームで書く ;(setq wl-draft-use-frame t) +;; スレッド表示のインデントを無制限にする。 +;(setq wl-summary-indent-length-limit nil) +;(setq wl-summary-width nil) + ;; サブジェクトが変わったらスレッドを切って表示 ;(setq wl-summary-divide-thread-when-subject-changed t) diff --git a/wl/ChangeLog b/wl/ChangeLog index 40e3617..9252d1b 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,19 @@ +2001-12-07 Yoichi NAKAYAMA + + * wl-vars.el (wl-summary-from-width): Rename from wl-from-width. + (wl-summary-subject-length-limit): Rename from wl-subject-length-limit. + Change default value to nil. + (wl-summary-indent-length-limit): The value can be nil, nil means + unlimited. + + * wl-summary.el: Don't set limit for indent length if the value of + wl-summary-indent-length-limit is nil. + If the value of wl-summary-width is nil, it means only that the width + of summary is unlimited (nil doesn't mean that the indent length is + unlimited). + + * wl-thread.el: Ditto. + 2001-12-06 Hiroshi Tsutsui * wl-vars.el (wl-summary-update-confirm-threshold): The value can diff --git a/wl/wl-summary.el b/wl/wl-summary.el index 01d62f9..9ff6b20 100644 --- a/wl/wl-summary.el +++ b/wl/wl-summary.el @@ -1288,7 +1288,7 @@ If ARG is non-nil, checking is omitted." "[ " (save-match-data (wl-set-string-width - wl-from-width + wl-summary-from-width (wl-summary-from-func-internal (eword-decode-string (elmo-delete-char @@ -4218,8 +4218,7 @@ If ARG, exit virtual folder." (setq linked (wl-thread-entity-get-linked thr-entity))) (if (string= thr-str "") (setq no-parent t)) ; no parent - (if (and wl-summary-width - wl-summary-indent-length-limit + (if (and wl-summary-indent-length-limit (< wl-summary-indent-length-limit (string-width thr-str))) (setq thr-str (wl-set-string-width @@ -4228,8 +4227,8 @@ If ARG, exit virtual folder." (setq from (wl-set-string-width (if children-num - (- wl-from-width (length children-num) 2) - wl-from-width) + (- wl-summary-from-width (length children-num) 2) + wl-summary-from-width) (elmo-delete-char ?\n (wl-summary-from-func-internal (elmo-msgdb-overview-entity-get-from entity))))) @@ -4271,8 +4270,8 @@ If ARG, exit virtual folder." subject parent-subject))) (wl-summary-subject-func-internal subject) "")) (if (and (not wl-summary-width) - wl-subject-length-limit) - (truncate-string subject wl-subject-length-limit) + wl-summary-subject-length-limit) + (truncate-string subject wl-summary-subject-length-limit) subject))))) (if wl-summary-width (setq line (wl-set-string-width @@ -5234,7 +5233,7 @@ Use function list is `wl-summary-write-current-folder-functions'." (setq wl-summary-buffer-current-msg num) (when wl-summary-recenter (recenter (/ (- (window-height) 2) 2)) - (if (not wl-summary-width) + (if (not wl-summary-indent-length-limit) (wl-horizontal-recenter))) (wl-highlight-summary-displaying) (wl-message-buffer-prefetch-next folder num (current-buffer) @@ -5260,7 +5259,7 @@ Use function list is `wl-summary-write-current-folder-functions'." (setq wl-summary-buffer-current-msg num) (when wl-summary-recenter (recenter (/ (- (window-height) 2) 2)) - (if (not wl-summary-width) + (if (not wl-summary-indent-length-limit) (wl-horizontal-recenter))) (wl-highlight-summary-displaying) (run-hooks 'wl-summary-redisplay-hook)) @@ -5287,7 +5286,7 @@ Use function list is `wl-summary-write-current-folder-functions'." (setq wl-summary-buffer-current-msg num) (when wl-summary-recenter (recenter (/ (- (window-height) 2) 2)) - (if (not wl-summary-width) + (if (not wl-summary-indent-length-limit) (wl-horizontal-recenter))) (wl-highlight-summary-displaying) (run-hooks 'wl-summary-redisplay-hook)) diff --git a/wl/wl-thread.el b/wl/wl-thread.el index 26f4eab..e31050f 100644 --- a/wl/wl-thread.el +++ b/wl/wl-thread.el @@ -751,12 +751,12 @@ Message is inserted to the summary buffer." (goto-char (match-end 0)) (setq beg (current-column)) (setq from-end (save-excursion - (move-to-column (+ 1 beg wl-from-width)) + (move-to-column (+ 1 beg wl-summary-from-width)) (point))) (setq from (buffer-substring (match-end 0) from-end)) (delete-region (match-end 0) from-end) (setq str (wl-set-string-width - (1+ wl-from-width) + (1+ wl-summary-from-width) (format "+%s:%s" (wl-thread-entity-get-children-num @@ -1213,8 +1213,7 @@ Message is inserted to the summary buffer." (setq thr-str (wl-thread-make-indent-string (wl-thread-get-entity (string-to-int (wl-match-buffer 1))))) - (if (and wl-summary-width - wl-summary-indent-length-limit + (if (and wl-summary-indent-length-limit (< wl-summary-indent-length-limit (string-width thr-str))) (setq thr-str (wl-set-string-width diff --git a/wl/wl-vars.el b/wl/wl-vars.el index f6bf3cd..2bb0f4e 100644 --- a/wl/wl-vars.el +++ b/wl/wl-vars.el @@ -1327,8 +1327,9 @@ with wl-highlight-folder-many-face." :group 'wl-pref) (defcustom wl-summary-indent-length-limit 46 - "*Limit of indent length for thread." - :type 'integer + "*Limit of indent length for thread. Nil means unlimited" + :type '(choice (const :tag "Unlimited" nil) + integer) :group 'wl-summary :group 'wl-pref) @@ -1368,13 +1369,13 @@ with wl-highlight-folder-many-face." (string :tag "Other")) :group 'wl-summary) -(defcustom wl-from-width 17 +(defcustom wl-summary-from-width 17 "*From width in summary." :type 'integer :group 'wl-summary :group 'wl-pref) -(defcustom wl-subject-length-limit 35 +(defcustom wl-summary-subject-length-limit nil "*Set subject width in summary when wl-summary-width is nil. Nil means unlimited" :type '(choice (const :tag "Unlimited" nil) -- 1.7.10.4