From: teranisi Date: Mon, 24 Mar 2003 04:48:40 +0000 (+0000) Subject: * elmo.el (elmo-folder-unmark-important): Added optional argument X-Git-Tag: elmo-mark-restart~69 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=b008bdc4a3d219916bd8c4bbd1f9a78191149718;p=elisp%2Fwanderlust.git * elmo.el (elmo-folder-unmark-important): Added optional argument `ignore-flag'. (All related portions are changed.) --- diff --git a/elmo/ChangeLog b/elmo/ChangeLog index 01e7161..457ee32 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,6 +1,8 @@ 2003-03-24 Yuuichi Teranishi * elmo.el (elmo-message-set-mark): Abolish. + (elmo-folder-unmark-important): Added optional argument `ignore-flag'. + (All related portions are changed.) * elmo-msgdb.el (toplevel): Added comment. (elmo-load-msgdb): Added 4th element `path'. diff --git a/elmo/elmo-filter.el b/elmo/elmo-filter.el index 822e13a..1e4c7a1 100644 --- a/elmo/elmo-filter.el +++ b/elmo/elmo-filter.el @@ -296,16 +296,20 @@ (luna-define-method elmo-folder-mark-as-important :around ((folder elmo-filter-folder) - numbers) + numbers + &optional + ignore-flag) (elmo-folder-mark-as-important (elmo-filter-folder-target-internal folder) - numbers) + numbers ignore-flag) (luna-call-next-method)) (luna-define-method elmo-folder-unmark-important :around ((folder elmo-filter-folder) - numbers) + numbers + &optional + ignore-flag) (elmo-folder-unmark-important (elmo-filter-folder-target-internal folder) - numbers) + numbers ignore-flag) (luna-call-next-method)) (luna-define-method elmo-folder-mark-as-answered :around ((folder diff --git a/elmo/elmo-map.el b/elmo/elmo-map.el index eaac9b7..2657ea5 100644 --- a/elmo/elmo-map.el +++ b/elmo/elmo-map.el @@ -277,17 +277,23 @@ (luna-define-method elmo-folder-unmark-important :before ((folder elmo-map-folder) - numbers) - (elmo-map-folder-unmark-important - folder - (elmo-map-folder-numbers-to-locations folder numbers))) + numbers + &optional + ignore-flags) + (unless ignore-flags + (elmo-map-folder-unmark-important + folder + (elmo-map-folder-numbers-to-locations folder numbers)))) (luna-define-method elmo-folder-mark-as-important :before ((folder elmo-map-folder) - numbers) - (elmo-map-folder-mark-as-important - folder - (elmo-map-folder-numbers-to-locations folder numbers))) + numbers + &optional + ignore-flags) + (unless ignore-flags + (elmo-map-folder-mark-as-important + folder + (elmo-map-folder-numbers-to-locations folder numbers)))) (luna-define-method elmo-folder-unmark-read :before ((folder elmo-map-folder) numbers diff --git a/elmo/elmo-multi.el b/elmo/elmo-multi.el index 5be1400..31f7573 100644 --- a/elmo/elmo-multi.el +++ b/elmo/elmo-multi.el @@ -586,17 +586,23 @@ (luna-define-method elmo-folder-mark-as-important :before ((folder elmo-multi-folder) - numbers) + numbers + &optional + ignore-flags) (dolist (folder-numbers (elmo-multi-make-folder-numbers-list folder numbers)) (elmo-folder-mark-as-important (car folder-numbers) - (cdr folder-numbers)))) + (cdr folder-numbers) + ignore-flags))) (luna-define-method elmo-folder-unmark-important :before ((folder elmo-multi-folder) - numbers) + numbers + &optional + ignore-flags) (dolist (folder-numbers (elmo-multi-make-folder-numbers-list folder numbers)) (elmo-folder-unmark-important (car folder-numbers) - (cdr folder-numbers)))) + (cdr folder-numbers) + ignore-flags))) (luna-define-method elmo-folder-mark-as-read :before ((folder elmo-multi-folder) diff --git a/elmo/elmo-net.el b/elmo/elmo-net.el index 34e1143..22d40f6 100644 --- a/elmo/elmo-net.el +++ b/elmo/elmo-net.el @@ -457,8 +457,11 @@ Returned value is searched from `elmo-network-stream-type-alist'." (luna-define-method elmo-folder-unmark-important :before ((folder elmo-net-folder) - numbers) - (when (elmo-folder-use-flag-p folder) + numbers + &optional + ignore-flag) + (when (and (elmo-folder-use-flag-p folder) + (not ignore-flag)) (if (elmo-folder-plugged-p folder) (elmo-folder-send folder 'elmo-folder-unmark-important-plugged numbers) @@ -467,8 +470,11 @@ Returned value is searched from `elmo-network-stream-type-alist'." (luna-define-method elmo-folder-mark-as-important :before ((folder elmo-net-folder) - numbers) - (when (elmo-folder-use-flag-p folder) + numbers + &optional + ignore-flag) + (when (and (elmo-folder-use-flag-p folder) + (not ignore-flag)) (if (elmo-folder-plugged-p folder) (elmo-folder-send folder 'elmo-folder-mark-as-important-plugged numbers) diff --git a/elmo/elmo-pipe.el b/elmo/elmo-pipe.el index 2797298..eb48a3e 100644 --- a/elmo/elmo-pipe.el +++ b/elmo/elmo-pipe.el @@ -288,14 +288,16 @@ numbers ignore-flag)) (luna-define-method elmo-folder-unmark-important ((folder elmo-pipe-folder) - numbers) + numbers + &optional ignore-flag) (elmo-folder-unmark-important (elmo-pipe-folder-dst-internal folder) - numbers)) + numbers ignore-flag)) (luna-define-method elmo-folder-mark-as-important ((folder elmo-pipe-folder) - numbers) + numbers + &optional ignore-flag) (elmo-folder-mark-as-important (elmo-pipe-folder-dst-internal folder) - numbers)) + numbers ignore-flag)) (luna-define-method elmo-folder-pack-numbers ((folder elmo-pipe-folder)) (elmo-folder-pack-numbers (elmo-pipe-folder-dst-internal folder))) diff --git a/elmo/elmo.el b/elmo/elmo.el index 048b677..3a99fb0 100644 --- a/elmo/elmo.el +++ b/elmo/elmo.el @@ -339,15 +339,21 @@ FOLDER is the ELMO folder structure. NUMBERS is a list of message numbers to create msgdb. ID-MARK-TABLE is a hashtable of message-id and its status mark.") -(luna-define-generic elmo-folder-unmark-important (folder numbers) +(luna-define-generic elmo-folder-unmark-important (folder + numbers + &optional ignore-flags) "Un-mark messages as important. FOLDER is the ELMO folder structure. -NUMBERS is a list of message numbers to be processed.") +NUMBERS is a list of message numbers to be processed. +If IGNORE-FLAGS is non-nil, folder flags are not updated.") -(luna-define-generic elmo-folder-mark-as-important (folder numbers) +(luna-define-generic elmo-folder-mark-as-important (folder + numbers + &optional ignore-flags) "Mark messages as important. FOLDER is the ELMO folder structure. -NUMBERS is a list of message numbers to be processed.") +NUMBERS is a list of message numbers to be processed. +If IGNORE-FLAGS is non-nil, folder flags are not updated.") (luna-define-generic elmo-folder-unmark-read (folder numbers &optional ignore-flags) @@ -1184,7 +1190,8 @@ FIELD is a symbol of the field." folder) ; default is folder (luna-define-method elmo-folder-unmark-important ((folder elmo-folder) - numbers) + numbers + &optional ignore-flags) (when (elmo-folder-msgdb-internal folder) (dolist (number numbers) (elmo-msgdb-unset-flag (elmo-folder-msgdb folder) @@ -1193,7 +1200,8 @@ FIELD is a symbol of the field." 'important)))) (luna-define-method elmo-folder-mark-as-important ((folder elmo-folder) - numbers) + numbers + &optional ignore-flags) (when (elmo-folder-msgdb-internal folder) (dolist (number numbers) (elmo-msgdb-set-flag (elmo-folder-msgdb folder)