2003-03-24 Yuuichi Teranishi <teranisi@gohome.org>
* 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'.
(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
(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
(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)
(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)
(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)
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)))
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)
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)
'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)