* wl-fldmgr.el (wl-fldmgr-set-petname): Check wl-folder-group-alist
authoryoichi <yoichi>
Fri, 24 Dec 2004 02:37:44 +0000 (02:37 +0000)
committeryoichi <yoichi>
Fri, 24 Dec 2004 02:37:44 +0000 (02:37 +0000)
only if the target is group.
* wl-folder.el (wl-folder-append-petname): Don't check group name.

wl/ChangeLog
wl/wl-fldmgr.el
wl/wl-folder.el

index 20e074c..1365389 100644 (file)
@@ -1,3 +1,9 @@
+2004-12-24  Yoichi NAKAYAMA  <yoichi@geiin.org>
+
+       * wl-fldmgr.el (wl-fldmgr-set-petname): Check wl-folder-group-alist
+       only if the target is group.
+       * wl-folder.el (wl-folder-append-petname): Don't check group name.
+
 2004-12-23  Yoichi NAKAYAMA  <yoichi@geiin.org>
 
        * wl-folder.el (wl-folder-buffer-search-entity): Check real name.
index 058c3e0..b84d9ed 100644 (file)
@@ -1268,7 +1268,8 @@ return value is diffs '(-new -unread -all)."
          (if (string= petname old-petname)
              nil
            (if (or (rassoc petname wl-folder-petname-alist)
-                   (wl-string-assoc petname wl-folder-group-alist))
+                   (and is-group
+                        (wl-string-assoc petname wl-folder-group-alist)))
                (message "%s: already exists" petname)
              (wl-folder-append-petname name petname)
              (setq change t)))))
index 3e9467b..4e53bb8 100644 (file)
@@ -1513,15 +1513,12 @@ Entering Folder mode calls the value of `wl-folder-mode-hook'."
   (run-hooks 'wl-folder-mode-hook))
 
 (defun wl-folder-append-petname (realname petname)
-  (let (pentry)
-    ;; check group name.
-    (if (wl-folder-search-group-entity-by-name petname wl-folder-entity)
-       (error "%s already defined as group name" petname))
-    (when (setq pentry (wl-string-assoc realname wl-folder-petname-alist))
+  (let ((pentry (wl-string-assoc realname wl-folder-petname-alist)))
+    (when pentry
       (setq wl-folder-petname-alist
-           (delete pentry wl-folder-petname-alist)))
-    (wl-append wl-folder-petname-alist
-              (list (cons realname petname)))))
+           (delete pentry wl-folder-petname-alist))))
+  (wl-append wl-folder-petname-alist
+            (list (cons realname petname))))
 
 (defun wl-folder ()
   (let (initialize folder-buf)