From 4b6415dfa236d5d0744a1079edee169f33152aa1 Mon Sep 17 00:00:00 2001 From: hmurata Date: Sun, 24 Oct 2004 01:33:30 +0000 Subject: [PATCH] * wl-summary.el (wl-summary-set-flags): Allow flag operation even if folder type is `'flag'. (wl-summary-mark-as-important): Ditto. * elmo-multi.el (elmo-folder-unset-flag): Ignore errors. * elmo-flag.el (elmo-folder-unset-flag): Define. (elmo-global-flag-detach): Do process when the flag is not target flag. --- elmo/ChangeLog | 8 ++++++++ elmo/elmo-flag.el | 10 +++++++++- elmo/elmo-multi.el | 3 ++- wl/ChangeLog | 8 +++++++- wl/wl-summary.el | 4 ---- 5 files changed, 26 insertions(+), 7 deletions(-) diff --git a/elmo/ChangeLog b/elmo/ChangeLog index 10b562b..0d89886 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,11 @@ +2004-10-24 Hiroya Murata + + * elmo-multi.el (elmo-folder-unset-flag): Ignore errors. + + * elmo-flag.el (elmo-folder-unset-flag): Define. + (elmo-global-flag-detach): Do process when the flag is not target + flag. + 2004-10-18 Yoichi NAKAYAMA * modb-entity.el (elmo-msgdb-prefer-in-reply-to-for-parent): New diff --git a/elmo/elmo-flag.el b/elmo/elmo-flag.el index 23344bb..4061dd2 100644 --- a/elmo/elmo-flag.el +++ b/elmo/elmo-flag.el @@ -213,6 +213,13 @@ &optional flag number) (error "Cannot append to the flag folder")) +(luna-define-method elmo-folder-unset-flag :before ((folder elmo-flag-folder) + numbers + flag + &optional is-local) + (when (eq flag (elmo-flag-folder-flag-internal folder)) + (error "Cannot unset flag `%s' in this folder." flag))) + ;;; Utilities (defmacro elmo-flag-get-folder (flag) @@ -371,7 +378,8 @@ If optional DELETE-IF-NONE is non-nil, delete message from flag folder when the message is not flagged in any folder. If DELETE-IF-NONE is a symbol `always', delete message without flagged in other folder." - (unless (eq (elmo-folder-type-internal folder) 'flag) + (unless (and (eq (elmo-folder-type-internal folder) 'flag) + (eq (elmo-flag-folder-flag-internal folder) flag)) (let ((flag-folder (elmo-flag-get-folder flag)) elem key) (when flag-folder diff --git a/elmo/elmo-multi.el b/elmo/elmo-multi.el index c709fc3..5f3d5df 100644 --- a/elmo/elmo-multi.el +++ b/elmo/elmo-multi.el @@ -426,7 +426,8 @@ flag &optional is-local) (dolist (pair (elmo-multi-make-folder-numbers-list folder numbers)) - (elmo-folder-unset-flag (car pair) (cdr pair) flag is-local))) + (ignore-errors + (elmo-folder-unset-flag (car pair) (cdr pair) flag is-local)))) (luna-define-method elmo-folder-list-flagged ((folder elmo-multi-folder) flag diff --git a/wl/ChangeLog b/wl/ChangeLog index 61219f8..1905757 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,9 @@ +2004-10-24 Hiroya Murata + + * wl-summary.el (wl-summary-set-flags): Allow flag operation even + if folder type is `'flag'. + (wl-summary-mark-as-important): Ditto. + 2004-10-16 Hiroya Murata * wl-address.el (wl-address-minibuffer-history): New variable. @@ -4645,7 +4651,7 @@ message is not displayed yet. (wl-summary-prev-page): Ditto. -2002-03-11 J,Ai(Br,At(Bme Marant +2002-03-11 J.ANirNtme Marant * wl-folder.el (wl-folder-mode-menu-spec): Fixed typo. diff --git a/wl/wl-summary.el b/wl/wl-summary.el index 0ca01fd..a2e1069 100644 --- a/wl/wl-summary.el +++ b/wl/wl-summary.el @@ -3265,14 +3265,10 @@ Return non-nil if the mark is updated" (defun wl-summary-set-flags (&optional remove) (interactive "P") - (if (eq 'flag (elmo-folder-type-internal wl-summary-buffer-elmo-folder)) - (error "Cannot process flags in this folder")) (wl-summary-set-flags-internal nil nil nil remove)) (defun wl-summary-mark-as-important (&optional prompt) (interactive "P") - (if (eq 'flag (elmo-folder-type-internal wl-summary-buffer-elmo-folder)) - (error "Cannot process flags in this folder")) (if prompt (wl-summary-set-flags-internal) (wl-summary-set-persistent-mark-internal -- 1.7.10.4