From 4cb4f8c05a71114f5b8fe473ca3f8b81495a114c Mon Sep 17 00:00:00 2001 From: hmurata Date: Tue, 1 Feb 2005 11:20:24 +0000 Subject: [PATCH] (elmo-flag-valid-p): Simplify. (elmo-folder-list-subfolders): Copy `elmo-global-flags'. (elmo-folder-delete): Update `elmo-global-flag-folder-alist'. --- elmo/ChangeLog | 6 ++++++ elmo/elmo-flag.el | 9 +++++---- 2 files changed, 11 insertions(+), 4 deletions(-) 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) -- 1.7.10.4