From: teranisi Date: Mon, 2 Jul 2001 04:34:10 +0000 (+0000) Subject: * wl-vars.el: Changed file coding system to euc-japan. X-Git-Tag: wl-2_7_2~33 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a3c48affe7f292e29f122ee04bf5da7b60fb717a;p=elisp%2Fwanderlust.git * wl-vars.el: Changed file coding system to euc-japan. Added -*-coding:-*- magic to the first line. * wl-summary.el (wl-summary-search-by-subject): Fixed bug; Search parent from the first message. * elmo.el (elmo-folder-clear): New method. (elmo-folder-clear): Define. (elmo-folder-synchronize): Call `elmo-folder-clear'. * elmo-shimbun.el (elmo-folder-check): Rewrite. (elmo-folder-clear): Define. * elmo-map.el (elmo-folder-clear): Define. --- diff --git a/elmo/ChangeLog b/elmo/ChangeLog index d55c9a2..08004f3 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,5 +1,14 @@ 2001-07-02 Yuuichi Teranishi + * elmo.el (elmo-folder-clear): New method. + (elmo-folder-clear): Define. + (elmo-folder-synchronize): Call `elmo-folder-clear'. + + * elmo-shimbun.el (elmo-folder-check): Rewrite. + (elmo-folder-clear): Define. + + * elmo-map.el (elmo-folder-clear): Define. + * elmo-version.el (elmo-version): Up to 2.7.1. 2001-06-26 Yuuichi Teranishi diff --git a/elmo/elmo-map.el b/elmo/elmo-map.el index b3e4612..9fa616a 100644 --- a/elmo/elmo-map.el +++ b/elmo/elmo-map.el @@ -244,6 +244,15 @@ folder (elmo-map-folder-list-message-locations folder))) +(luna-define-method elmo-folder-clear :around ((folder elmo-map-folder) + &optional keep-killed) + (unless keep-killed + (elmo-map-folder-set-number-max-internal folder 0) + (elmo-map-folder-set-location-alist-internal folder nil) + ;; clear hashtable. + (elmo-map-folder-set-location-hash-internal folder (elmo-make-hash))) + (luna-call-next-method)) + (luna-define-method elmo-folder-list-messages-internal ((folder elmo-map-folder) &optional nohide) (mapcar 'car (elmo-map-folder-location-alist-internal folder))) diff --git a/elmo/elmo-shimbun.el b/elmo/elmo-shimbun.el index 06ae738..9fcab2d 100644 --- a/elmo/elmo-shimbun.el +++ b/elmo/elmo-shimbun.el @@ -225,13 +225,20 @@ See `shimbun-headers' for more detail about RANGE." (elmo-shimbun-folder-shimbun-internal folder)) nil)) -(luna-define-method elmo-folder-check :after ((folder elmo-shimbun-folder)) +(luna-define-method elmo-folder-check :around ((folder elmo-shimbun-folder)) (when (shimbun-current-group-internal (elmo-shimbun-folder-shimbun-internal folder)) - (when (elmo-shimbun-headers-check-p folder) - ;; Discard current headers information. - (elmo-folder-close-internal folder) - (elmo-folder-open-internal folder)))) + (when (and (elmo-folder-plugged-p folder) + (elmo-shimbun-headers-check-p folder)) + (elmo-shimbun-get-headers folder) + (luna-call-next-method)))) + +(luna-define-method elmo-folder-clear :around ((folder elmo-shimbun-folder) + &optional keep-killed) + (elmo-shimbun-folder-set-headers-internal folder nil) + (elmo-shimbun-folder-set-header-hash-internal folder nil) + (elmo-shimbun-folder-set-last-check-internal folder nil) + (luna-call-next-method)) (luna-define-method elmo-folder-expand-msgdb-path ((folder elmo-shimbun-folder)) diff --git a/elmo/elmo.el b/elmo/elmo.el index b77b6dc..ad59646 100644 --- a/elmo/elmo.el +++ b/elmo/elmo.el @@ -159,6 +159,10 @@ If optional LOAD-MSGDB is non-nil, msgdb is loaded. (luna-define-generic elmo-folder-check (folder) "Check the FOLDER to obtain newest information at the next list operation.") +(luna-define-generic elmo-folder-clear (folder &optional keep-killed) + "Clear FOLDER to the initial state. +If optional KEEP-KILLED is non-nil, killed-list is not cleared.") + (luna-define-generic elmo-folder-commit (folder) "Save current status of FOLDER.") @@ -1152,6 +1156,12 @@ FIELD is a symbol of the field." (elmo-fetch-strategy-cache-path strategy) section))))) +(luna-define-method elmo-folder-clear ((folder elmo-folder) + &optional keep-killed) + (unless keep-killed + (elmo-folder-set-killed-list-internal folder nil)) + (elmo-folder-set-msgdb-internal folder (elmo-msgdb-clear))) + (defun elmo-folder-synchronize (folder new-mark ;"N" unread-uncached-mark ;"U" @@ -1167,8 +1177,9 @@ are mark strings for new messages, unread but cached messages, read but not cached messages, and important messages. If optional IGNORE-MSGDB is non-nil, current msgdb is thrown away except read mark status. If IGNORE-MSGDB is 'visible-only, only visible messages -are thrown away and synchronized. -If NO-CHECK is non-nil, recheck folder is skipped. +\(the messages which are not in the killed-list\) are thrown away and +synchronized. +If NO-CHECK is non-nil, rechecking folder is skipped. Return a list of \(NEW-MSGDB DELETE-LIST CROSSED\) @@ -1195,11 +1206,7 @@ If update process is interrupted, return nil." number-alist mark-alist (concat important-mark read-uncached-mark)) seen-list)) - ;; Make killed list as nil. - (unless (eq ignore-msgdb 'visible-only) - (elmo-folder-set-killed-list-internal folder nil)) - (elmo-folder-set-msgdb-internal folder - (elmo-msgdb-clear)))) + (elmo-folder-clear folder (eq ignore-msgdb 'visible-only)))) (unless no-check (elmo-folder-check folder)) (condition-case nil (progn diff --git a/wl/ChangeLog b/wl/ChangeLog index 46df8bf..f0daa17 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,5 +1,11 @@ 2001-07-02 Yuuichi Teranishi + * wl-vars.el: Changed file coding system to euc-japan. + Added -*-coding:-*- magic to the first line. + + * wl-summary.el (wl-summary-search-by-subject): Fixed bug; + Search parent from the first message. + * Version number is increased to 2.7.1. 2001-06-28 OHASHI Akira diff --git a/wl/wl-summary.el b/wl/wl-summary.el index da71618..867b143 100644 --- a/wl/wl-summary.el +++ b/wl/wl-summary.el @@ -2762,11 +2762,11 @@ If ARG, without confirm." (run-hooks 'wl-summary-insert-headers-hook))) (defun wl-summary-search-by-subject (entity overview) - (let ((buf (get-buffer-create wl-summary-search-buf-name)) + (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) - (save-excursion - (set-buffer buf) + (with-current-buffer buf (let ((case-fold-search t)) (when (or (not (string= wl-summary-search-buf-folder-name folder-name)) (zerop (buffer-size))) @@ -2782,23 +2782,26 @@ If ARG, without confirm." (elmo-msgdb-overview-entity-get-subject entity))) (if (string= match "") (setq match "\n")) - (goto-char (point-max)) + (goto-char (point-min)) (while (and (not founds) - (not (= (point) (point-min))) - (search-backward match nil t)) + (not (= (point) (point-max))) + (search-forward match nil t)) ;; check exactly match - (when (and (bolp) - (= (point-at-eol) - (match-end 0))) + (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)))) - (not (wl-thread-descendant-p - (elmo-msgdb-overview-entity-get-number entity) - (elmo-msgdb-overview-entity-get-number (car found-entity))))) + (elmo-msgdb-overview-entity-get-id + (car found-entity)))) + (with-current-buffer summary-buf + (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 @@ -2827,8 +2830,9 @@ If ARG, without confirm." ;; Search parent by subject. (when (and (null parent-number) wl-summary-search-parent-by-subject-regexp - (string-match wl-summary-search-parent-by-subject-regexp - (elmo-msgdb-overview-entity-get-subject entity))) + (string-match + wl-summary-search-parent-by-subject-regexp + (elmo-msgdb-overview-entity-get-subject entity))) (let ((found (wl-summary-search-by-subject entity overview))) (when (and found (not (member found wl-summary-delayed-update))) diff --git a/wl/wl-vars.el b/wl/wl-vars.el index fae823d..1dc5c87 100644 --- a/wl/wl-vars.el +++ b/wl/wl-vars.el @@ -1,4 +1,4 @@ -;;; wl-vars.el -- Variable definitions for Wanderlust. +;;; wl-vars.el -- Variable definitions for Wanderlust. -*-coding:euc-japan;-*- ;; Copyright (C) 1998,1999,2000,2001 Yuuichi Teranishi ;; Copyright (C) 1998,1999,2000,2001 Masahiro MURATA @@ -1454,12 +1454,12 @@ every intervals specified by wl-biff-check-interval." :type 'integer :group 'wl-highlight) -(defcustom wl-biff-state-indicator-on "[$B")(B]" +(defcustom wl-biff-state-indicator-on "[¢©]" "String used to show biff status ON." :type 'string :group 'wl-highlight) -(defcustom wl-biff-state-indicator-off "[$B!>(B]" +(defcustom wl-biff-state-indicator-off "[¡¾]" "String used to show biff status OFF." :type 'string :group 'wl-highlight) @@ -2161,15 +2161,15 @@ a symbol `bitmap', `xbm' or `xpm' in order to force the image format." ;; Advanced thread view. (defvar wl-thread-indent-level 1 "*Indent level for thread.") -(defvar wl-thread-have-younger-brother-str "$B(2(B" +(defvar wl-thread-have-younger-brother-str "¨²" "*A string for thread branch line. It should contain one character.") -(defvar wl-thread-youngest-child-str "$B(1(B" +(defvar wl-thread-youngest-child-str "¨±" "*A string for thread branch line. It should contain one character.") -(defvar wl-thread-vertical-str "$B(-(B" +(defvar wl-thread-vertical-str "¨­" "*A string for thread branch line. It should contain one character.") -(defvar wl-thread-horizontal-str "$B(,(B" +(defvar wl-thread-horizontal-str "¨¬" "*A string for thread branch line. It should contain one character.") -(defvar wl-thread-space-str "$B!!(B" +(defvar wl-thread-space-str "¡¡" "*A string for thread branch line. It should contain one character.") (defvar wl-highlight-thread-indent-string-regexp "[^[<]*"