From: teranisi Date: Tue, 5 Apr 2005 13:57:50 +0000 (+0000) Subject: Synch up with main trunk. X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=d93b14821d6a679f8f32e6c11306ec31da059c55;p=elisp%2Fwanderlust.git Synch up with main trunk. --- diff --git a/elmo/ChangeLog b/elmo/ChangeLog index 40e94e7..bc88c21 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,10 @@ +2005-04-05 Yuuichi Teranishi + + * 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 * elmo-maildir.el (elmo-folder-msgdb-create): Don't sort by date. diff --git a/elmo/elmo-maildir.el b/elmo/elmo-maildir.el index 5031d61..9632959 100644 --- a/elmo/elmo-maildir.el +++ b/elmo/elmo-maildir.el @@ -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 diff --git a/wl/ChangeLog b/wl/ChangeLog index 3eda71a..6953413 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,12 @@ +2005-04-04 Tetsurou Okazaki + + * wl-action.el (wl-summary-exec): Reduce loop strength in a dolist loop. + +2005-04-03 Hiroya Murata + + * 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 * wl-xmas.el (wl-folder-internal-icon-list): Fix last change. diff --git a/wl/wl-action.el b/wl/wl-action.el index 24820e1..0918594 100644 --- a/wl/wl-action.el +++ b/wl/wl-action.el @@ -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) diff --git a/wl/wl-thread.el b/wl/wl-thread.el index 0d48474..f397240 100644 --- a/wl/wl-thread.el +++ b/wl/wl-thread.el @@ -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.