From: hmurata Date: Sun, 14 Jul 2002 08:46:55 +0000 (+0000) Subject: * elmo-split.el (elmo-split): Moved to run hooks and to show X-Git-Tag: elmo-mark-root~51 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bfd5b5420e07cdd7309c451f640aeba6d1c4494f;p=elisp%2Fwanderlust.git * elmo-split.el (elmo-split): Moved to run hooks and to show message from elmo-split-subr. (elmo-split-subr): Follow the change above. --- diff --git a/elmo/ChangeLog b/elmo/ChangeLog index a20dc1a..3fbc8da 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,5 +1,9 @@ 2002-07-14 Hiroya Murata + * elmo-split.el (elmo-split): Moved to run hooks and to show + message from elmo-split-subr. + (elmo-split-subr): Follow the change above. + * elmo-split.el (elmo-split-subr): New function (renamed from elmo-split-subr). (elmo-split): Changed to call elmo-split-subr by element of diff --git a/elmo/elmo-split.el b/elmo/elmo-split.el index a9765a4..70699f0 100644 --- a/elmo/elmo-split.el +++ b/elmo/elmo-split.el @@ -209,9 +209,27 @@ If prefix argument ARG is specified, do a reharsal (no harm)." (error "Split rule doest not exist. Set `elmo-split-rule' first.")) (let ((folders (if (listp elmo-split-folder) elmo-split-folder - (list elmo-split-folder)))) + (list elmo-split-folder))) + (count 0) + (fcount 0) + ret) (dolist (folder folders) - (elmo-split-subr (elmo-make-folder folder) arg)))) + (setq ret (elmo-split-subr (elmo-make-folder folder) arg) + count (+ count (car ret)) + fcount (+ fcount (cdr ret)))) + (run-hooks 'elmo-split-hook) + (message + (concat + (cond + ((eq count 0) + "No message is splitted") + ((eq count 1) + "1 message is splitted") + (t + (format "%d messages are splitted" count))) + (if (eq fcount 0) + "." + (format " (%d failure)." fcount)))))) (defun elmo-split-subr (folder &optional reharsal) (let ((elmo-inhibit-display-retrieval-progress t) @@ -283,19 +301,7 @@ If prefix argument ARG is specified, do a reharsal (no harm)." (elmo-progress-notify 'elmo-split))) (elmo-folder-close-internal folder)) (elmo-progress-clear 'elmo-split)) - (run-hooks 'elmo-split-hook) - (message - (concat - (cond - ((eq count 0) - "No message is splitted") - ((eq count 1) - "1 message is splitted") - (t - (format "%d messages are splitted" count))) - (if (eq fcount 0) - "." - (format " (%d failure)." fcount)))))) + (cons count fcount))) (provide 'elmo-split)