X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=wl%2Fwl-score.el;h=bddb74a78b56b0c98458b332b55ba4eeb40f8116;hb=98f38e5383840a86e4ebca5803d505110d0997f8;hp=597462254b3e7105ed313aeb10462fc4a4794cf1;hpb=d688102f6d004b5c9165d9bb558fdaaeef0ea982;p=elisp%2Fwanderlust.git diff --git a/wl/wl-score.el b/wl/wl-score.el index 5974622..bddb74a 100644 --- a/wl/wl-score.el +++ b/wl/wl-score.el @@ -1,4 +1,4 @@ -;;; wl-score.el -- Scoring in Wanderlust. +;;; wl-score.el --- Scoring in Wanderlust. ;; Copyright (C) 1998,1999,2000 Masahiro MURATA ;; Copyright (C) 1998,1999,2000 Yuuichi Teranishi @@ -28,7 +28,7 @@ ;; Original codes are gnus-score.el and score-mode.el ;;; Code: -;; +;; (require 'wl-vars) @@ -200,7 +200,7 @@ Remove Re, Was, Fwd etc." (defun wl-score-string-index< (a1 a2) (string-lessp (wl-score-ov-entity-get-by-index (car a1) wl-score-index) - (wl-score-ov-entity-get-by-index (car a2) wl-score-index))) + (wl-score-ov-entity-get-by-index (car a2) wl-score-index))) (defun wl-score-string-func< (a1 a2) (string-lessp (funcall wl-score-index (car a1)) @@ -310,12 +310,12 @@ Set `wl-score-cache' nil." (or (and (string-match (concat "^" (regexp-quote (expand-file-name - wl-score-files-dir))) + wl-score-files-directory))) (expand-file-name file)) file) (expand-file-name file - (file-name-as-directory wl-score-files-dir))))) + (file-name-as-directory wl-score-files-directory))))) (cached (assoc file wl-score-cache)) alist) (if cached @@ -341,7 +341,7 @@ Set `wl-score-cache' nil." (let ((files (wl-get-assoc-list-value score-alist folder (if (not wl-score-folder-alist-matchone) 'all-list))) - fl f) + fl f) (while (setq f (wl-pop files)) (wl-append fl @@ -859,7 +859,7 @@ Set `wl-score-cache' nil." (defun wl-score-change-score-file (file) "Change current score alist." (interactive - (list (read-file-name "Change to score file: " wl-score-files-dir))) + (list (read-file-name "Change to score file: " wl-score-files-directory))) (wl-score-load-file file)) (defun wl-score-default (level) @@ -1206,6 +1206,7 @@ Set `wl-score-cache' nil." (count (length alist)) (i 0) (update-unread nil) + wl-summary-unread-message-hook num score dels visible score-mark mark-alist) (save-excursion (message "Updating score...") @@ -1224,9 +1225,9 @@ Set `wl-score-cache' nil." (wl-push num dels)) ((< score wl-summary-mark-below) (if visible - (wl-summary-mark-as-read t); opened + (wl-summary-mark-as-read num); opened (setq update-unread t) - (wl-summary-mark-as-read t nil nil num))) ; closed + (wl-summary-mark-as-read num))) ; closed ((and wl-summary-important-above (> score wl-summary-important-above)) (if (wl-thread-jump-to-msg num);; force open @@ -1244,15 +1245,12 @@ Set `wl-score-cache' nil." 'wl-summary-score-update-all-lines "Updating score..." (/ (* i 100) count)))) (when dels - (setq mark-alist - (elmo-msgdb-get-mark-alist (wl-summary-buffer-msgdb))) (let ((marks dels)) (while marks - (setq mark-alist - (elmo-msgdb-mark-set mark-alist (pop marks) nil)))) + (elmo-msgdb-set-mark (wl-summary-buffer-msgdb) + (pop marks) nil))) (elmo-folder-mark-as-read wl-summary-buffer-elmo-folder dels) - (elmo-msgdb-set-mark-alist (wl-summary-buffer-msgdb) mark-alist) (wl-summary-delete-messages-on-buffer dels)) (when (and update update-unread) (let ((num-db (elmo-msgdb-get-number-alist @@ -1261,10 +1259,12 @@ Set `wl-score-cache' nil." (wl-summary-buffer-msgdb)))) ;; Update Folder mode (wl-folder-set-folder-updated (wl-summary-buffer-folder-name) - (list 0 - (wl-summary-count-unread - mark-alist) - (length num-db))) + (list + 0 + (let ((pair + (wl-summary-count-unread))) + (+ (car pair) (cdr pair))) + (length num-db))) (wl-summary-update-modeline))) (message "Updating score...done") dels))) @@ -1287,7 +1287,7 @@ Set `wl-score-cache' nil." (defun wl-score-edit-file (file) "Edit a score FILE." (interactive - (list (read-file-name "Edit score file: " wl-score-files-dir))) + (list (read-file-name "Edit score file: " wl-score-files-directory))) (when (wl-collect-summary) (wl-score-save)) (let ((winconf (current-window-configuration))