From: hmurata Date: Tue, 1 Feb 2005 11:20:24 +0000 (+0000) Subject: (elmo-flag-valid-p): Simplify. X-Git-Tag: wl-2_14-root~66 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=4cb4f8c05a71114f5b8fe473ca3f8b81495a114c;p=elisp%2Fwanderlust.git (elmo-flag-valid-p): Simplify. (elmo-folder-list-subfolders): Copy `elmo-global-flags'. (elmo-folder-delete): Update `elmo-global-flag-folder-alist'. --- diff --git a/elmo/ChangeLog b/elmo/ChangeLog index b9102c0..f7fc547 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,9 @@ +2005-02-01 Hiroya Murata + + * elmo-flag.el (elmo-flag-valid-p): Simplify. + (elmo-folder-list-subfolders): Copy `elmo-global-flags'. + (elmo-folder-delete): Update `elmo-global-flag-folder-alist'. + 2005-01-30 TAKAHASHI Kaoru * elmo-util.el (elmo-passwd-alist-load, elmo-passwd-alist-save): diff --git a/elmo/elmo-flag.el b/elmo/elmo-flag.el index bd4f0f7..c3ae100 100644 --- a/elmo/elmo-flag.el +++ b/elmo/elmo-flag.el @@ -47,11 +47,9 @@ (defconst elmo-flag-char-regexp "]!#$&'+,./0-9:;<=>?@A-Z[^_`a-z|}~-")) (defun elmo-flag-valid-p (flag) - (unless (stringp flag) - (setq flag (symbol-name flag))) (string-match (eval-when-compile (concat "^[" elmo-flag-char-regexp "]+$")) - flag)) + (if (stringp flag) flag (symbol-name flag)))) (eval-and-compile (luna-define-class elmo-flag-folder (elmo-localdir-folder) @@ -144,7 +142,7 @@ (elmo-uniq-list (append (mapcar 'intern (delete ".." (delete "." (directory-files dir)))) - elmo-global-flags))))) + (copy-sequence elmo-global-flags)))))) (defun elmo-flag-folder-delete-message (folder number &optional keep-referrer) @@ -483,6 +481,9 @@ If optional IGNORE-PRESERVED is non-nil, preserved flags (let ((flag (elmo-flag-folder-flag-internal folder))) (when (luna-call-next-method) (setq elmo-global-flags (delq flag elmo-global-flags)) + (setq elmo-global-flag-folder-alist + (delq (assq flag elmo-global-flag-folder-alist) + elmo-global-flag-folder-alist)) t))) (require 'product)