From: hmurata Date: Sun, 5 Sep 2004 05:46:29 +0000 (+0000) Subject: (modb-legacy-flag-list): New constant. X-Git-Tag: wl-2_11_31~11 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1d846eec56e922d22d7162091d743ce165a0a2ae;p=elisp%2Fwanderlust.git (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. --- diff --git a/elmo/ChangeLog b/elmo/ChangeLog index 89087a8..39f7bb0 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,10 @@ +2004-09-05 Hiroya Murata + + * 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 * elmo.el (elmo-make-folder): Remove text properties for prefix. diff --git a/elmo/modb-legacy.el b/elmo/modb-legacy.el index 9adf900..161c0b0 100644 --- a/elmo/modb-legacy.el +++ b/elmo/modb-legacy.el @@ -59,6 +59,10 @@ (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)) @@ -140,6 +144,8 @@ ;;; +(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 () @@ -363,6 +369,9 @@ Return a list of message numbers which have duplicated message-ids." (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)) @@ -385,6 +394,9 @@ Return a list of message numbers which have duplicated message-ids." (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)) diff --git a/elmo/modb.el b/elmo/modb.el index adab8db..9d5c9af 100644 --- a/elmo/modb.el +++ b/elmo/modb.el @@ -80,7 +80,7 @@ FLAG is a symbol which is one of the following: `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.") @@ -94,7 +94,7 @@ FLAG is a symbol which is one of the following: `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.")