From c34d23690d7984237656c3b03728e85620a39af7 Mon Sep 17 00:00:00 2001 From: teranisi Date: Fri, 13 Oct 2000 02:50:54 +0000 Subject: [PATCH] * elmo2.el (elmo-call-func-on-markable-msgs): Return t if marking was succeeded. * elmo-util.el (elmo-folder-get-spec): Enclose with save-match-data. --- elmo/ChangeLog | 7 +++++++ elmo/elmo-util.el | 5 +++-- elmo/elmo2.el | 8 +++++--- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/elmo/ChangeLog b/elmo/ChangeLog index 13c2ed8..1af01e9 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,10 @@ +2000-10-13 Yuuichi Teranishi + + * elmo2.el (elmo-call-func-on-markable-msgs): Return t if marking + was succeeded. + + * elmo-util.el (elmo-folder-get-spec): Enclose with save-match-data. + 2000-10-12 Yuuichi Teranishi * elmo-localdir.el (elmo-localdir-list-folders-subr): Bind diff --git a/elmo/elmo-util.el b/elmo/elmo-util.el index 404f401..99e1b97 100644 --- a/elmo/elmo-util.el +++ b/elmo/elmo-util.el @@ -476,8 +476,9 @@ File content is encoded with MIME-CHARSET." "return spec of folder" (let ((type (elmo-folder-get-type folder))) (if type - (funcall (intern (concat "elmo-" (symbol-name type) "-get-spec")) - folder) + (save-match-data + (funcall (intern (concat "elmo-" (symbol-name type) "-get-spec")) + folder)) (error "%s is not supported folder type" folder)))) ;;; Search Condition diff --git a/elmo/elmo2.el b/elmo/elmo2.el index aade66e..31a82ee 100644 --- a/elmo/elmo2.el +++ b/elmo/elmo2.el @@ -435,9 +435,10 @@ without cacheing." ret-val)) (defun elmo-call-func-on-markable-msgs (folder func-name msgs msgdb) + "Returns t if marked." (save-match-data (let ((folder-numbers (elmo-make-folder-numbers-list folder msgs)) - type) + type error) (while folder-numbers (if (or (eq (setq type (car @@ -454,8 +455,9 @@ without cacheing." func-name (cdr (car folder-numbers)) ; real number msgdb) - (error "Unplugged")))) - (setq folder-numbers (cdr folder-numbers)))))) + (setq error t)))) + (setq folder-numbers (cdr folder-numbers))) + (not error)))) (defun elmo-unmark-important (folder msgs msgdb) (elmo-call-func-on-markable-msgs folder "unmark-important" msgs msgdb)) -- 1.7.10.4