Synch up with main trunk.
authorteranisi <teranisi>
Tue, 5 Apr 2005 13:57:50 +0000 (13:57 +0000)
committerteranisi <teranisi>
Tue, 5 Apr 2005 13:57:50 +0000 (13:57 +0000)
elmo/ChangeLog
elmo/elmo-maildir.el
wl/ChangeLog
wl/wl-action.el
wl/wl-thread.el

index 40e94e7..bc88c21 100644 (file)
@@ -1,3 +1,10 @@
+2005-04-05  Yuuichi Teranishi  <teranisi@gohome.org>
+
+       * elmo-maildir.el (elmo-maildir-sequence-number): New function.
+       (elmo-maildir-make-unique-string): Throw Emacs 18 away.
+       (elmo-maildir-list-location): Use `elmo-maildir-sequence-number' to
+       compare sequence number when last modified time is nil.
+
 2005-04-03  Yuuichi Teranishi  <teranisi@gohome.org>
 
        * elmo-maildir.el (elmo-folder-msgdb-create): Don't sort by date.
index 5031d61..9632959 100644 (file)
@@ -113,13 +113,19 @@ LOCATION."
         (cur (directory-files cur-dir
                               nil "^[^.].*$" t))
         unread-locations flagged-locations answered-locations
-        sym locations flag-list)
+        sym locations flag-list x-time y-time)
     (setq cur (sort cur
                    (lambda (x y)
-                     (< (elmo-get-last-modification-time
-                         (expand-file-name x cur-dir))
-                        (elmo-get-last-modification-time
-                         (expand-file-name y cur-dir))))))
+                     (setq x-time (elmo-get-last-modification-time
+                                   (expand-file-name x cur-dir))
+                           y-time (elmo-get-last-modification-time
+                                   (expand-file-name y cur-dir)))
+                     (cond
+                      ((< x-time y-time)
+                       t)
+                      ((eq x-time y-time)
+                       (< (elmo-maildir-sequence-number x)
+                          (elmo-maildir-sequence-number y)))))))
     (setq locations
          (mapcar
           (lambda (x)
@@ -377,36 +383,24 @@ LOCATION."
 
 (defvar elmo-maildir-sequence-number-internal 0)
 
-(static-cond
- ((>= emacs-major-version 19)
-  (defun elmo-maildir-make-unique-string ()
-    "This function generates a string that can be used as a unique
-file name for maildir directories."
-     (let ((cur-time (current-time)))
-       (format "%.0f.%d_%d.%s"
-             (+ (* (car cur-time)
-                    (float 65536)) (cadr cur-time))
-             (emacs-pid)
-             (incf elmo-maildir-sequence-number-internal)
-             (system-name)))))
- ((eq emacs-major-version 18)
-  ;; A fake function for v18
-  (defun elmo-maildir-make-unique-string ()
-    "This function generates a string that can be used as a unique
+(defun elmo-maildir-sequence-number (file)
+  "Get `elmo-maildir' specific sequence number from FILE.
+Not that FILE is the name without directory."
+  ;; elmo-maildir specific.
+  (if (string-match "^.*_\\([0-9]+\\)\\..*" file)
+      (string-to-number (match-string 1 file))
+    -1))
+
+(defun elmo-maildir-make-unique-string ()
+  "This function generates a string that can be used as a unique
 file name for maildir directories."
-    (unless (fboundp 'float-to-string)
-      (load-library "float"))
-    (let ((time (current-time)))
-      (format "%s%d.%d.%s"
-             (substring
-              (float-to-string
-               (f+ (f* (f (car time))
-                       (f 65536))
-                   (f (cadr time))))
-              0 5)
-             (cadr time)
-             (% (abs (random t)) 10000); dummy pid
-             (system-name))))))
+  (let ((cur-time (current-time)))
+    (format "%.0f.%d_%d.%s"
+           (+ (* (car cur-time)
+                 (float 65536)) (cadr cur-time))
+           (emacs-pid)
+           (incf elmo-maildir-sequence-number-internal)
+           (system-name))))
 
 (defun elmo-maildir-temporal-filename (basedir)
   (let ((filename (expand-file-name
index 3eda71a..6953413 100644 (file)
@@ -1,3 +1,12 @@
+2005-04-04  Tetsurou Okazaki  <okazaki@be.to>
+
+       * wl-action.el (wl-summary-exec): Reduce loop strength in a dolist loop.
+
+2005-04-03  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
+
+       * wl-thread.el (wl-thread-delete-message): Delete descendant
+       numbers from `wl-summary-buffer-number-list' if `deep' is non-nil.
+
 2005-04-03  Yuuichi Teranishi  <teranisi@gohome.org>
 
        * wl-xmas.el (wl-folder-internal-icon-list): Fix last change.
index 24820e1..0918594 100644 (file)
@@ -682,12 +682,13 @@ Return number if put mark succeed"
     ;; collected is a pair of
     ;; mark-string and a list of mark-info
     (dolist (pair collected)
-      (setq action (assoc (car pair) wl-summary-mark-action-list))
-      (when (and (cdr pair) (wl-summary-action-exec-function action))
-       (setq modified t)
-       (setq failures (+ failures (funcall
-                                   (wl-summary-action-exec-function action)
-                                   (cdr pair))))))
+      (when (cdr pair)
+       (setq action (assoc (car pair) wl-summary-mark-action-list))
+       (when (wl-summary-action-exec-function action)
+         (setq modified t)
+         (setq failures (+ failures (funcall
+                                     (wl-summary-action-exec-function action)
+                                     (cdr pair)))))))
     (when modified
       (wl-summary-set-message-modified))
     (run-hooks 'wl-summary-exec-hook)
index 0d48474..f397240 100644 (file)
@@ -505,6 +505,12 @@ ENTITY is returned."
       (setq wl-summary-buffer-number-list
            (delq msg wl-summary-buffer-number-list))
       (when entity
+       (when deep
+         (setq wl-summary-buffer-number-list
+               (elmo-list-delete
+                (wl-thread-entity-get-descendant entity)
+                wl-summary-buffer-number-list
+                #'delq)))
        (let ((parent (wl-thread-entity-get-parent-entity entity)))
          (if parent
              ;; has parent.