* wl-draft.el (wl-draft-create-contents): Fix docstring.
[elisp/wanderlust.git] / wl / wl-score.el
index 5974622..0016bd2 100644 (file)
@@ -1,4 +1,4 @@
-;;; wl-score.el -- Scoring in Wanderlust.
+;;; wl-score.el --- Scoring in Wanderlust.
 
 ;; Copyright (C) 1998,1999,2000 Masahiro MURATA <muse@ba2.so-net.ne.jp>
 ;; Copyright (C) 1998,1999,2000 Yuuichi Teranishi <teranisi@gohome.org>
@@ -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...")
@@ -1262,8 +1263,10 @@ Set `wl-score-cache' nil."
          ;; Update Folder mode
          (wl-folder-set-folder-updated (wl-summary-buffer-folder-name)
                                        (list 0
-                                             (wl-summary-count-unread
-                                              mark-alist)
+                                             (let ((pair
+                                                    (wl-summary-count-unread
+                                                     mark-alist)))
+                                               (+ (car pair) (cdr pair)))
                                              (length num-db)))
          (wl-summary-update-modeline)))
       (message "Updating score...done")
@@ -1287,7 +1290,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))