+2004-09-05 Hiroya Murata <lapis-lazuli@pop06.odn.ne.jp>
+
+ * modb-legacy.el (modb-legacy-flag-list): New constant.
+ (modb-legacy-suppoted-flag-p): New internal function.
+ (elmo-msgdb-set-flag): Check flag by `modb-legacy-suppoted-flag-p'.
+ (elmo-msgdb-unset-flag): Ditto.
+
2004-09-05 Yuuichi Teranishi <teranisi@gohome.org>
* elmo.el (elmo-make-folder): Remove text properties for prefix.
(defconst modb-legacy-important-mark "$"
"Mark for important message.")
+(defconst modb-legacy-flag-list
+ '(new unread important answered cached read uncached)
+ "A list of flag symbol which is suppoted by legacy msgdb.")
+
(eval-and-compile
(luna-define-class modb-legacy (modb-generic)
(overview number-alist mark-alist index))
;;;
+(defsubst modb-legacy-suppoted-flag-p (flag)
+ (memq flag modb-legacy-flag-list))
(defvar modb-legacy-unread-marks-internal nil)
(defsubst modb-legacy-unread-marks ()
(luna-define-method elmo-msgdb-set-flag ((msgdb modb-legacy)
number flag)
+ (unless (modb-legacy-suppoted-flag-p flag)
+ (error "Flag `%s' is not supproted by this msgdb type"
+ (capitalize (symbol-name flag))))
(case flag
(read
(elmo-msgdb-unset-flag msgdb number 'unread))
(luna-define-method elmo-msgdb-unset-flag ((msgdb modb-legacy)
number flag)
+ (unless (modb-legacy-suppoted-flag-p flag)
+ (error "Flag `%s' is not supproted by this msgdb type"
+ (capitalize (symbol-name flag))))
(case flag
(read
(elmo-msgdb-set-flag msgdb number 'unread))
`important' ... Message which is important.
`answered' ... Message which is answered.
`cached' ... Message which is cached.
-'sugar' falg:
+'sugar' flag:
`read' ... Message which is already read.
`uncached' ... Message which is not cached.")
`important' ... Message which is important.
`answered' ... Message which is answered.
`cached' ... Message which is cached.
-'sugar' falg:
+'sugar' flag:
`read' ... Message which is already read.
`uncached' ... Message which is not cached.
`all' ... Remove all flags.")