From: teranisi Date: Tue, 10 Oct 2000 02:59:01 +0000 (+0000) Subject: Fix last change. X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=6ce11143716fcd3c30d3d40d9a1c78c7c4f17f31;p=elisp%2Fwanderlust.git Fix last change. * elmo-multi.el (elmo-multi-split-mark-alist): Copy and sort alist before splitting. (elmo-multi-split-number-alist): Ditto. --- diff --git a/elmo/ChangeLog b/elmo/ChangeLog index 6f4ff74..4ade1a5 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,9 @@ +2000-10-10 Yuuichi Teranishi + + * elmo-multi.el (elmo-multi-split-mark-alist): Copy and sort alist + before splitting. + (elmo-multi-split-number-alist): Ditto. + 2000-10-10 TAKAHASHI Kaoru * elmo-version.el: New file. Use product.el. diff --git a/elmo/elmo-multi.el b/elmo/elmo-multi.el index f196354..a54659b 100644 --- a/elmo/elmo-multi.el +++ b/elmo/elmo-multi.el @@ -188,27 +188,32 @@ (defun elmo-multi-split-mark-alist (mark-alist) (let ((cur-number 0) + (alist (sort (copy-sequence mark-alist) + (lambda (pair1 pair2) + (< (car pair1)(car pair2))))) one-alist result) - (while mark-alist + (while alist (setq cur-number (+ cur-number 1)) (setq one-alist nil) - (while (and mark-alist + (while (and alist (eq 0 - (/ (- (car (car mark-alist)) + (/ (- (car (car alist)) (* elmo-multi-divide-number cur-number)) elmo-multi-divide-number))) (setq one-alist (nconc one-alist (list - (list (% (car (car mark-alist)) + (list (% (car (car alist)) (* elmo-multi-divide-number cur-number)) - (cadr (car mark-alist)))))) - (setq mark-alist (cdr mark-alist))) + (cadr (car alist)))))) + (setq alist (cdr alist))) (setq result (nconc result (list one-alist)))) result)) (defun elmo-multi-split-number-alist (number-alist) - (let ((alist number-alist) + (let ((alist (sort (copy-sequence number-alist) + (lambda (pair1 pair2) + (< (car pair1)(car pair2))))) (cur-number 0) one-alist split num) (while alist