* wl-fldmgr.el (wl-fldmgr-add-completion-all-completions): Pass
authorueno <ueno>
Fri, 6 Oct 2000 18:32:53 +0000 (18:32 +0000)
committerueno <ueno>
Fri, 6 Oct 2000 18:32:53 +0000 (18:32 +0000)
the 5th argument of `elmo-network-get-spec'.

* wl-thread.el (wl-thread-reparent-children): New inline function.
(wl-thread-delete-message): Use it.

* wl-score.el (wl-score-headers): Abolish local variable
(wl-summary-score-update-all-lines): Don't use `dolist'.

wl/ChangeLog
wl/wl-fldmgr.el
wl/wl-score.el
wl/wl-thread.el

index f93bfe6..bf60d9a 100644 (file)
@@ -1,3 +1,14 @@
+2000-10-06   Daiki Ueno  <ueno@unixuser.org>
+
+       * wl-fldmgr.el (wl-fldmgr-add-completion-all-completions): Pass
+       the 5th argument of `elmo-network-get-spec'.
+
+       * wl-thread.el (wl-thread-reparent-children): New inline function.
+       (wl-thread-delete-message): Use it.
+
+       * wl-score.el (wl-score-headers): Abolish local variable
+       (wl-summary-score-update-all-lines): Don't use `dolist'.
+
 2000-10-06  TAKAHASHI Kaoru  <kaoru@kaisei.org>
 
        * wl-score.el (toplevel): Remove (provide 'elmo-msgdb).  And add
index f74a104..b97a092 100644 (file)
@@ -761,7 +761,7 @@ return value is diffs '(-new -unread -all)."
        (pattern
         (if (string-match "\\.$"
                           (car (elmo-network-get-spec
-                                string nil nil nil)))
+                                string nil nil nil nil)))
             (substring string 0 (match-beginning 0))
           (concat string nil))))
     (or table
index 095e9f7..3db076d 100644 (file)
@@ -36,8 +36,6 @@
 (eval-when-compile
   (require 'elmo-msgdb))               ; for inline functions
 
-(eval-when-compile (require 'cl))      ; dolist
-
 (defvar wl-score-edit-header-char
   '((?a "from" nil string)
     (?s "subject" nil string)
@@ -464,9 +462,8 @@ See `wl-score-simplify-buffer-fuzzy' for details."
        (setq wl-scores-messages (cdr wl-scores-messages))))
     (message "Scoring...done")
     ;; Remove buffers.
-    (let (buffer)
-      (while (setq buffer (pop wl-score-header-buffer-list))
-       (elmo-kill-buffer buffer)))))
+    (while wl-score-header-buffer-list
+      (elmo-kill-buffer (pop wl-score-header-buffer-list)))))
 
 (defun wl-score-integer (scores header now expire)
   (let ((wl-score-index (nth 2 (assoc header wl-score-header-index)))
@@ -1255,12 +1252,12 @@ See `wl-score-simplify-buffer-fuzzy' for details."
           'wl-summary-score-update-all-lines "Updating score..."
           (/ (* i 100) count))))
       (when dels
-;      (elmo-msgdb-delete-msgs wl-summary-buffer-folder-name
-;                              dels wl-summary-buffer-msgdb t)
-       ;; mark as read.
-       (setq mark-alist (elmo-msgdb-get-mark-alist wl-summary-buffer-msgdb))
-       (dolist (del dels)
-         (setq mark-alist (elmo-msgdb-mark-set mark-alist del nil)))
+       (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-mark-as-read wl-summary-buffer-folder-name
                           dels wl-summary-buffer-msgdb)
        (elmo-msgdb-set-mark-alist wl-summary-buffer-msgdb mark-alist)
index f65d92a..9d99d16 100644 (file)
@@ -32,8 +32,6 @@
 (require 'wl-summary)
 (require 'wl-highlight)
 
-(eval-when-compile (require 'cl))      ; dolist
-
 ;; buffer local variables.
 ;(defvar wl-thread-top-entity '(nil t nil nil)) ; top entity
 (defvar wl-thread-tops nil)           ; top number list (number)
     (message "Resuming thread structure...")
     ;; set obarray value.
     (setq wl-thread-entity-hashtb (elmo-make-hash (* (length entities) 2)))
-    (dolist (entity entities)
-      (elmo-set-hash-val (format "#%d" (car entity)) entity
-                        wl-thread-entity-hashtb))
     ;; set buffer local variables.
     (setq wl-thread-entities entities)
     (setq wl-thread-entity-list top-list)
+    (while entities
+      (elmo-set-hash-val (format "#%d" (car (car entities))) (car entities)
+                        wl-thread-entity-hashtb)
+      (setq entities (cdr entities)))
     (message "Resuming thread structure...done.")))
 
 (defun wl-thread-save-entity (dir)
     (nconc entity (list linked)))
   entity)
 
+(defsubst wl-thread-reparent-children (children parent)
+  (while children
+    (wl-thread-entity-set-parent
+     (wl-thread-get-entity (car children)) parent)
+    (wl-thread-entity-set-linked
+     (wl-thread-get-entity (car children)) t)
+    (setq children (cdr children))))
+
 (defsubst wl-thread-entity-insert-as-top (entity)
   (when (and entity
             (car entity))
@@ -805,22 +812,18 @@ the closed parent will be opened."
              ;;
              (unless deep
                (setq children (wl-thread-entity-get-children entity))
-               (dolist (entity children)
-                 (wl-thread-entity-set-parent
-                  (wl-thread-get-entity entity)
-                  (wl-thread-entity-get-number parent))
-                 (wl-thread-entity-set-linked
-                  (wl-thread-get-entity entity)
-                  t)
-                 (wl-append update-msgs
-                            (wl-thread-get-children-msgs entity t))))
+               (wl-thread-reparent-children
+                children (wl-thread-entity-get-number parent))
+               (setq update-msgs
+                     (apply (function nconc)
+                            update-msgs
+                            (mapcar
+                             (function
+                              (lambda (message)
+                                (wl-thread-get-children-msgs message t))
+                              children)))))
              (wl-thread-entity-set-children
-              parent
-              (append
-               (append
-                older-brothers
-                children)
-               younger-brothers))
+              parent (append older-brothers children younger-brothers))
              ;; If chidren and younger-brothers not exists,
              ;; update nearly older brother.
              (when (and older-brothers
@@ -847,11 +850,7 @@ the closed parent will be opened."
               (append
                (wl-thread-entity-get-children top-entity)
                children))
-             (dolist (entity children)
-               (wl-thread-entity-set-parent (wl-thread-get-entity entity)
-                                            top-child)
-               (wl-thread-entity-set-linked (wl-thread-get-entity entity)
-                                            t))
+             (wl-thread-reparent-children children top-child)
              (wl-append update-msgs children)))
          ;; delete myself from top list.
          (setq older-brothers (wl-thread-entity-get-older-brothers