* elmo-internal.el (elmo-internal-obsolete-folder-list): New variable.
authorteranisi <teranisi>
Thu, 6 Nov 2003 14:34:42 +0000 (14:34 +0000)
committerteranisi <teranisi>
Thu, 6 Nov 2003 14:34:42 +0000 (14:34 +0000)
(elmo-folder-initialize): Raise a warning when obsolete folder is used.

elmo/ChangeLog
elmo/elmo-internal.el

index e8f8754..722e7b6 100644 (file)
@@ -1,5 +1,8 @@
 2003-11-06  Yuuichi Teranishi  <teranisi@gohome.org>
 
+       * elmo-internal.el (elmo-internal-obsolete-folder-list): New variable.
+       (elmo-folder-initialize): Raise a warning when obsolete folder is used.
+
        * elmo-vars.el (elmo-init-hook): New user option.
 
        * elmo.el (elmo-init): Run the elmo-init-hook.
index feb3be1..4de1308 100644 (file)
 ;;; ELMO internal folder
 (luna-define-class elmo-internal-folder (elmo-folder) ())
 
+(defvar elmo-internal-folder-list '(flag cache sendlog))
+(defvar elmo-internal-obsolete-folder-list '((mark flag)))
+
 (luna-define-method elmo-folder-initialize ((folder
                                             elmo-internal-folder)
                                            name)
+  (when (assq (intern name) elmo-internal-obsolete-folder-list)
+    (elmo-warning
+     "Folder '%s is now obsolete. Use '%s instead."
+     name
+     (cadr (assq (intern name) elmo-internal-obsolete-folder-list))))
   (elmo-internal-folder-initialize folder name))
 
-(defvar elmo-internal-folder-list '(flag cache sendlog))
-
 (defun elmo-internal-folder-initialize (folder name)
   (let ((fsyms elmo-internal-folder-list)
        fname class sym)