"Set message cache status.
If mark is changed, return non-nil."
(let* ((cur-mark (elmo-msgdb-get-mark msgdb number))
- (cur-status (cond
+ (cur-flag (cond
((string= cur-mark elmo-msgdb-important-mark)
'important)
((member cur-mark (elmo-msgdb-answered-marks))
'read)))
(cur-cached (not (member cur-mark (elmo-msgdb-uncached-marks)))))
(unless (eq cached cur-cached)
- (case cur-status
+ (case cur-flag
(read
(elmo-msgdb-set-mark msgdb number
(unless cached
elmo-msgdb-unread-cached-mark
elmo-msgdb-unread-uncached-mark)))))))
-(defun elmo-msgdb-set-status (msgdb folder number status)
- "Set message status.
+(defun elmo-msgdb-set-flag (msgdb folder number flag)
+ "Set message flag.
MSGDB is the ELMO msgdb.
FOLDER is a ELMO folder structure.
-NUMBER is a message number to be set status.
-STATUS is a symbol which is one of the following:
+NUMBER is a message number to set flag.
+FLAG is a symbol which is one of the following:
`read' ... Messages which are already read.
`important' ... Messages which are marked as important.
`answered' ... Messages which are marked as answered."
(let* ((cur-mark (elmo-msgdb-get-mark msgdb number))
(use-cache (elmo-message-use-cache-p folder number))
- (cur-status (cond
- ((string= cur-mark elmo-msgdb-important-mark)
- 'important)
- ((member cur-mark (elmo-msgdb-answered-marks))
- 'answered)
- ((not (member cur-mark (elmo-msgdb-unread-marks)))
- 'read)))
+ (cur-flag (cond
+ ((string= cur-mark elmo-msgdb-important-mark)
+ 'important)
+ ((member cur-mark (elmo-msgdb-answered-marks))
+ 'answered)
+ ((not (member cur-mark (elmo-msgdb-unread-marks)))
+ 'read)))
(cur-cached (not (member cur-mark (elmo-msgdb-uncached-marks))))
mark-modified)
- (case status
+ (case flag
(read
- (case cur-status
+ (case cur-flag
((read important answered))
(t (elmo-msgdb-set-mark msgdb number
(if (and use-cache (not cur-cached))
elmo-msgdb-read-uncached-mark))
(setq mark-modified t))))
(important
- (unless (eq cur-status 'important)
+ (unless (eq cur-flag 'important)
(elmo-msgdb-set-mark msgdb number elmo-msgdb-important-mark)
(setq mark-modified t)))
(answered
- (unless (or (eq cur-status 'answered) (eq cur-status 'important))
+ (unless (or (eq cur-flag 'answered) (eq cur-flag 'important))
(elmo-msgdb-set-mark msgdb number
(if cur-cached
(if use-cache
(setq mark-modified t)))
(if mark-modified (elmo-folder-set-mark-modified-internal folder t))))
-(defun elmo-msgdb-unset-status (msgdb folder number status)
- "Unset message status.
+(defun elmo-msgdb-unset-flag (msgdb folder number flag)
+ "Unset message flag.
MSGDB is the ELMO msgdb.
FOLDER is a ELMO folder structure.
-NUMBER is a message number to be set status.
-STATUS is a symbol which is one of the following:
+NUMBER is a message number to be set flag.
+FLAG is a symbol which is one of the following:
`read' ... Messages which are already read.
`important' ... Messages which are marked as important.
`answered' ... Messages which are marked as answered."
(let* ((cur-mark (elmo-msgdb-get-mark msgdb number))
(use-cache (elmo-message-use-cache-p folder number))
- (cur-status (cond
- ((string= cur-mark elmo-msgdb-important-mark)
- 'important)
- ((member cur-mark (elmo-msgdb-answered-marks))
- 'answered)
- ((not (member cur-mark (elmo-msgdb-unread-marks)))
- 'read)))
+ (cur-flag (cond
+ ((string= cur-mark elmo-msgdb-important-mark)
+ 'important)
+ ((member cur-mark (elmo-msgdb-answered-marks))
+ 'answered)
+ ((not (member cur-mark (elmo-msgdb-unread-marks)))
+ 'read)))
(cur-cached (not (member cur-mark (elmo-msgdb-uncached-marks))))
mark-modified)
- (case status
+ (case flag
(read
- (when (eq cur-status 'read)
+ (when (eq cur-flag 'read)
(elmo-msgdb-set-mark msgdb number
(if (and cur-cached use-cache)
elmo-msgdb-unread-cached-mark
elmo-msgdb-unread-uncached-mark))
(setq mark-modified t)))
(important
- (when (eq cur-status 'important)
+ (when (eq cur-flag 'important)
(elmo-msgdb-set-mark msgdb number nil)
(setq mark-modified t)))
(answered
- (when (eq cur-status 'answered)
+ (when (eq cur-flag 'answered)
(elmo-msgdb-set-mark msgdb number
(if (and cur-cached (not use-cache))
elmo-msgdb-read-uncached-mark))
(setcar (cdr entity) after))
(setq mark-alist (cdr mark-alist)))))
-(defsubst elmo-msgdb-mark (status cached)
- (case status
+(defsubst elmo-msgdb-mark (flag cached)
+ (case flag
(unread
(if cached
elmo-msgdb-unread-cached-mark
numbers)
(when (elmo-folder-msgdb-internal folder)
(dolist (number numbers)
- (elmo-msgdb-unset-status (elmo-folder-msgdb folder)
- folder
- number
- 'important))))
+ (elmo-msgdb-unset-flag (elmo-folder-msgdb folder)
+ folder
+ number
+ 'important))))
(luna-define-method elmo-folder-mark-as-important ((folder elmo-folder)
numbers)
(when (elmo-folder-msgdb-internal folder)
(dolist (number numbers)
- (elmo-msgdb-set-status (elmo-folder-msgdb folder)
- folder
- number
- 'important))))
+ (elmo-msgdb-set-flag (elmo-folder-msgdb folder)
+ folder
+ number
+ 'important))))
(luna-define-method elmo-folder-unmark-read ((folder elmo-folder)
numbers
&optional ignore-flags)
(when (elmo-folder-msgdb-internal folder)
(dolist (number numbers)
- (elmo-msgdb-unset-status (elmo-folder-msgdb folder)
- folder
- number
- 'read))))
+ (elmo-msgdb-unset-flag (elmo-folder-msgdb folder)
+ folder
+ number
+ 'read))))
(luna-define-method elmo-folder-mark-as-read ((folder elmo-folder)
numbers
&optional ignore-flag)
(when (elmo-folder-msgdb-internal folder)
(dolist (number numbers)
- (elmo-msgdb-set-status (elmo-folder-msgdb folder)
- folder
- number
- 'read))))
+ (elmo-msgdb-set-flag (elmo-folder-msgdb folder)
+ folder
+ number
+ 'read))))
(luna-define-method elmo-folder-unmark-answered ((folder elmo-folder) numbers)
(when (elmo-folder-msgdb-internal folder)
(dolist (number numbers)
- (elmo-msgdb-unset-status (elmo-folder-msgdb folder)
- folder
- number
- 'answered))))
+ (elmo-msgdb-unset-flag (elmo-folder-msgdb folder)
+ folder
+ number
+ 'answered))))
(luna-define-method elmo-folder-mark-as-answered ((folder elmo-folder) numbers)
(when (elmo-folder-msgdb-internal folder)
(dolist (number numbers)
- (elmo-msgdb-set-status (elmo-folder-msgdb folder)
- folder
- number
- 'answered))))
+ (elmo-msgdb-set-flag (elmo-folder-msgdb folder)
+ folder
+ number
+ 'answered))))
(luna-define-method elmo-folder-process-crosspost ((folder elmo-folder)
&optional
"Synchronize the folder data to the newest status.
FOLDER is the ELMO folder structure.
If optional IGNORE-MSGDB is non-nil, current msgdb is thrown away except
-read mark status. If IGNORE-MSGDB is 'visible-only, only visible messages
+flag status. If IGNORE-MSGDB is 'visible-only, only visible messages
\(the messages which are not in the killed-list\) are thrown away and
synchronized.
If NO-CHECK is non-nil, rechecking folder is skipped.