From 6367eb3218be307ea3f5ff0c159f468b2b0b86f2 Mon Sep 17 00:00:00 2001 From: teranisi Date: Sat, 12 Oct 2002 08:08:43 +0000 Subject: [PATCH] Synch up with main trunk. --- doc/wl-ja.texi | 7 +--- doc/wl.texi | 7 +--- elmo/ChangeLog | 1 + elmo/elmo-dop.el | 2 +- wl/ChangeLog | 28 +++++++++++++ wl/wl-summary.el | 115 +++++++++++++++++++++++++---------------------------- wl/wl-template.el | 8 ++-- wl/wl-thread.el | 13 ++---- wl/wl-vars.el | 12 ------ 9 files changed, 98 insertions(+), 95 deletions(-) diff --git a/doc/wl-ja.texi b/doc/wl-ja.texi index 343410b..0aac627 100644 --- a/doc/wl-ja.texi +++ b/doc/wl-ja.texi @@ -3163,6 +3163,8 @@ prefix argument $B$D$-$J$i$P%-%c%C%7%e$,B8:_$7$F$bL5;k$7$F:FFI$_9~$_$7D>$7$^$9! $B8=:_%+!<%=%k$,$"$k9T$N%a%C%;!<%8$,(B MIME $B$G%+%W%;%k2=$5$l$?J#?t$N%a%C%;!<%84^$`>l9g!"(B $B$=$l$i$r8=:_$N%U%)%k%@$K$[$I$-$^$9!#(B +$B=q$-9~$_IT2D$N%U%)%k%@$K5o$k>l9g$d(B prefix argument $B$r$D$1$Fl9g(B +$B$K$O!"E83+@h$N%U%)%k%@$r?R$M$^$9!#(B (@code{wl-summary-burst}) @item @@ @@ -3822,11 +3824,6 @@ petname $B$G$bJd40$,$G$-$^$9!#(B @vindex wl-summary-from-width $B=i4|@_Dj$O(B 17$B!#%5%^%j$N(B From $BItJ,$NI=<(I}$G$9!#(B -@item wl-summary-subject-length-limit -@vindex wl-summary-subject-length-limit -$B=i4|@_Dj$O(B @code{nil}$B!#%5%^%j$N(B Subject $BItJ,$NI=<(I}$N>e8B$G$9!#(B -@code{nil} $B$N>l9g!"(BSubject $BItJ,$ND9$5$N@)8B$r$7$^$;$s!#(B - @item wl-summary-indent-length-limit @vindex wl-summary-indent-length-limit $B=i4|@_Dj$O(B 46$B!#@_Dj$5$l$?CM0J>e%5%^%j$r%$%s%G%s%H$7$^$;$s!#(B@code{nil} $B$J(B diff --git a/doc/wl.texi b/doc/wl.texi index f42aec6..8f7e82b 100644 --- a/doc/wl.texi +++ b/doc/wl.texi @@ -3182,6 +3182,8 @@ Redisplay the message at current cursor point without MIME analysis. If the message at current cursor point has encapsulates multiple messages using MIME, de-capsulate and extract them on the current folder. +If it is invoked in non-writable folder or it is called with prefix +argument, it asks the destination folder. (@code{wl-summary-burst}) @item @@ @@ -3845,11 +3847,6 @@ Width of summary line. If @code{nil}, summary line's width is as is. 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. diff --git a/elmo/ChangeLog b/elmo/ChangeLog index cb0ddf0..582828f 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,6 +1,7 @@ 2002-10-06 Hiroya Murata * elmo-dop.el (elmo-dop-queue-flush): Check obsolete at first. + (elmo-dop-queue-flush): Fixed last change. 2002-10-01 Hiroya Murata diff --git a/elmo/elmo-dop.el b/elmo/elmo-dop.el index a390d88..3ddb76f 100644 --- a/elmo/elmo-dop.el +++ b/elmo/elmo-dop.el @@ -91,7 +91,7 @@ Automatically loaded/saved.") ;; obsolete (unless (or (null elmo-dop-queue) (vectorp (car elmo-dop-queue))) - (if (y-or-n-p " + (if (y-or-n-p "\ Saved queue is old version(2.6). Clear all pending operations? ") (progn (setq elmo-dop-queue nil) diff --git a/wl/ChangeLog b/wl/ChangeLog index ec534c1..cf0b3ac 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,31 @@ +2002-10-12 Yuuichi Teranishi + + * wl-summary.el (wl-summary-insert-headers): Put alike hash in reverse + order. + (wl-summary-search-by-subject): Search parent message from tail; + Check the existence of the parent message on the current thread tree. + (wl-summary-update-thread): Check whether the line is inserted. + +2002-10-10 Yoichi NAKAYAMA + + * wl-vars.el (wl-summary-line-format): Undo last change. + * wl-summary.el (wl-summary-print-destination): Do not put + invisible property when `wl-summary-width' is nil. + (wl-summary-line-subject-minimum-length): Abolished. + (wl-summary-line-subject): Ditto. + +2002-10-09 Yoichi NAKAYAMA + + * wl-vars.el (wl-summary-line-format): Change default value. + (wl-summary-subject-length-limit): Abolished. + * wl-summary.el (wl-summary-line-subject): Ditto. + +2002-10-09 Hiroya Murata + + * wl-template.el (wl-template-select): Added optional argument. + If optional argument is specified, reverse + `wl-template-visible-select'. + 2002-10-06 Yoichi NAKAYAMA * wl-mime.el (wl-summary-burst): Get elmo folder correctly. diff --git a/wl/wl-summary.el b/wl/wl-summary.el index 42d6aa4..6b01c98 100644 --- a/wl/wl-summary.el +++ b/wl/wl-summary.el @@ -2615,7 +2615,6 @@ If ARG, without confirm." wl-summary-alike-hashtb))) (defun wl-summary-insert-headers (overview func mime-decode) - (message "Creating subject cache...") (let (ov this last alike) (buffer-disable-undo (current-buffer)) (make-local-variable 'wl-summary-alike-hashtb) @@ -2626,7 +2625,7 @@ If ARG, without confirm." (setq this (funcall func ov)) (and this (setq this (std11-unfold-string this))) (if (equal last this) - (wl-append alike (list ov)) + (setq alike (cons ov alike)) (when last (wl-summary-put-alike alike) (insert last ?\n)) @@ -2640,54 +2639,59 @@ If ARG, without confirm." elmo-mime-charset) (when (eq mime-decode 'mime) (eword-decode-region (point-min) (point-max)))) - (message "Creating subject cache...done") (run-hooks 'wl-summary-insert-headers-hook))) (defun wl-summary-search-by-subject (entity overview) (let ((summary-buf (current-buffer)) (buf (get-buffer-create wl-summary-search-buf-name)) (folder-name (wl-summary-buffer-folder-name)) - match founds found-entity) + match founds cur result) (with-current-buffer buf (let ((case-fold-search t)) (when (or (not (string= wl-summary-search-buf-folder-name folder-name)) (zerop (buffer-size))) (setq wl-summary-search-buf-folder-name folder-name) + (message "Creating subject cache...") (wl-summary-insert-headers overview (function (lambda (x) (funcall wl-summary-subject-filter-function - (elmo-msgdb-overview-entity-get-subject-no-decode x)))) - t)) + (elmo-msgdb-overview-entity-get-subject-no-decode x)))) + t) + (message "Creating subject cache...done")) (setq match (funcall wl-summary-subject-filter-function (elmo-msgdb-overview-entity-get-subject entity))) (if (string= match "") (setq match "\n")) - (goto-char (point-min)) - (while (and (not founds) - (not (= (point) (point-max))) - (search-forward match nil t)) + (goto-char (point-max)) + (while (and (null result) + (not (= (point) (point-min))) + (search-backward match nil t)) ;; check exactly match - (when (and (eolp) - (= (point-at-bol) - (match-beginning 0))) - (setq found-entity (wl-summary-get-alike)) - (if (and found-entity - ;; Is founded entity myself or children? - (not (string= - (elmo-msgdb-overview-entity-get-id entity) - (elmo-msgdb-overview-entity-get-id - (car found-entity)))) - (with-current-buffer summary-buf + (when (and (bolp) (= (point-at-eol)(match-end 0))) + (setq founds (wl-summary-get-alike)) + (with-current-buffer summary-buf + (while founds + (when (and + ;; the first element of found-entity list exists on + ;; thread tree. + (wl-thread-get-entity + (elmo-msgdb-overview-entity-get-number + (car founds))) + ;; message id is not same as myself. + (not (string= + (elmo-msgdb-overview-entity-get-id entity) + (elmo-msgdb-overview-entity-get-id (car founds)))) + ;; not a descendant. (not (wl-thread-descendant-p (elmo-msgdb-overview-entity-get-number entity) (elmo-msgdb-overview-entity-get-number - (car found-entity)))))) - ;; return matching entity - (setq founds found-entity)))) - (if founds - (car founds)))))) + (car founds))))) + (setq result (car founds) + founds nil)) + (setq founds (cdr founds)))))) + result)))) (defun wl-summary-insert-thread-entity (entity msgdb update &optional force-insert) @@ -2766,26 +2770,29 @@ If ARG, without confirm." (overview-entity entity) (parent-id (elmo-msgdb-overview-entity-get-id parent-entity)) (number (elmo-msgdb-overview-entity-get-number entity)) - (parent-number (elmo-msgdb-overview-entity-get-number parent-entity))) + (parent-number (elmo-msgdb-overview-entity-get-number parent-entity)) + insert-line) (cond ((or (not parent-id) (string= this-id parent-id)) (goto-char (point-max)) - (beginning-of-line)) + (beginning-of-line) + (setq insert-line t)) ;; parent already exists in buffer. ((wl-summary-jump-to-msg parent-number) - (wl-thread-goto-bottom-of-sub-thread))) - (let ((inhibit-read-only t) - (buffer-read-only nil)) - (wl-summary-insert-line - (wl-summary-create-line - entity - parent-entity - nil - (elmo-msgdb-get-mark (wl-summary-buffer-msgdb) number) - (wl-thread-maybe-get-children-num number) - (wl-thread-make-indent-string thr-entity) - (wl-thread-entity-get-linked thr-entity)))))) + (wl-thread-goto-bottom-of-sub-thread) + (setq insert-line t))) + (when insert-line + (let (buffer-read-only) + (wl-summary-insert-line + (wl-summary-create-line + entity + parent-entity + nil + (elmo-msgdb-get-mark (wl-summary-buffer-msgdb) number) + (wl-thread-maybe-get-children-num number) + (wl-thread-make-indent-string thr-entity) + (wl-thread-entity-get-linked thr-entity))))))) (defun wl-summary-mark-as-unread (&optional number no-folder-mark @@ -3091,7 +3098,8 @@ If optional argument NUMBER is specified, mark message specified by NUMBER." (setq c (+ c (char-width (following-char))))) (and (> c len) (setq folder (concat " " folder))) (setq rs (point)) - (put-text-property rs re 'invisible t) + (when wl-summary-width + (put-text-property rs re 'invisible t)) (put-text-property rs re 'wl-summary-destination t) (goto-char re) (wl-highlight-refile-destination-string folder) @@ -4039,7 +4047,6 @@ If ARG, exit virtual folder." (t (format "%dB" size))) ""))) -(defvar wl-summary-line-subject-minimum-length nil) (defun wl-summary-line-subject () (let (no-parent subject parent-raw-subject parent-subject) (if (string= wl-thr-indent-string "") @@ -4054,24 +4061,12 @@ If ARG, exit virtual folder." (setq parent-subject (if parent-raw-subject (elmo-delete-char ?\n parent-raw-subject))) - (setq subject - (if (or no-parent - (null parent-subject) - (not (wl-summary-subject-equal - subject parent-subject))) - (funcall wl-summary-subject-function subject) - "")) - (when (and wl-summary-line-subject-minimum-length - (< (string-width subject) - wl-summary-line-subject-minimum-length)) - (while (< (string-width subject) - wl-summary-line-subject-minimum-length) - (setq subject (concat subject " ")))) - (if (and (not wl-summary-width) - wl-summary-subject-length-limit) - (truncate-string subject - wl-summary-subject-length-limit) - subject))) + (if (or no-parent + (null parent-subject) + (not (wl-summary-subject-equal + subject parent-subject))) + (funcall wl-summary-subject-function subject) + ""))) (defun wl-summary-line-from () (elmo-delete-char ?\n diff --git a/wl/wl-template.el b/wl/wl-template.el index ddbf66a..b6c910f 100644 --- a/wl/wl-template.el +++ b/wl/wl-template.el @@ -85,10 +85,12 @@ Entering WL-Template mode calls the value of `wl-template-mode-hook'." (setq buffer-read-only t) (run-hooks 'wl-template-mode-hook)) -(defun wl-template-select () +(defun wl-template-select (&optional arg) "Select template from `wl-template-alist'." - (interactive) - (if (not wl-template-visible-select) + (interactive "P") + (if (not (if arg + (not wl-template-visible-select) + wl-template-visible-select)) (wl-template-apply (completing-read (format "Template (%s): " wl-template-default-name) wl-template-alist)) diff --git a/wl/wl-thread.el b/wl/wl-thread.el index 067b10c..c9ca3d6 100644 --- a/wl/wl-thread.el +++ b/wl/wl-thread.el @@ -259,20 +259,15 @@ "If parent of ENTITY is invisible, the top invisible ancestor entity of ENTITY is returned." (let ((cur-entity entity) - ret-val) + top) (catch 'done (while (setq cur-entity (wl-thread-entity-get-parent-entity cur-entity)) (if (null (wl-thread-entity-get-number cur-entity)) - ;; top!! - (progn - ;;(setq ret-val nil) - (throw 'done nil)) + (throw 'done nil) (when (not (wl-thread-entity-get-opened cur-entity)) - ;; not opened!! - (setq ret-val cur-entity))))) - ;; top of closed entity in the path. - ret-val)) + (setq top cur-entity))))) + top)) (defun wl-thread-entity-get-nearly-older-brother (entity &optional parent) (let ((brothers (wl-thread-entity-get-older-brothers entity parent))) diff --git a/wl/wl-vars.el b/wl/wl-vars.el index 0bb77b8..e416b2d 100644 --- a/wl/wl-vars.el +++ b/wl/wl-vars.el @@ -1597,14 +1597,6 @@ with wl-highlight-folder-many-face." (string :tag "Other")) :group 'wl-summary) -(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) - integer) - :group 'wl-summary - :group 'wl-pref) - (defcustom wl-mime-charset 'x-ctext "*MIME Charset for summary and message." :type 'symbol @@ -2622,10 +2614,6 @@ a symbol `bitmap', `xbm' or `xpm' in order to force the image format." (elmo-define-obsolete-variable 'wl-tmp-dir 'wl-temporary-file-directory) -;; 2001-12-07 -(elmo-define-obsolete-variable 'wl-subject-length-limit - 'wl-summary-subject-length-limit) - ;; 2001-12-10 (elmo-define-obsolete-variable 'wl-summary-update-confirm-threshold 'elmo-folder-update-threshold) -- 1.7.10.4