* wl-fldmgr.el (wl-fldmgr-sort): Added optional argument;
authorteranisi <teranisi>
Tue, 6 Aug 2002 12:07:21 +0000 (12:07 +0000)
committerteranisi <teranisi>
Tue, 6 Aug 2002 12:07:21 +0000 (12:07 +0000)
If optional argument is specified, reverse sort order.

* wl-draft.el (wl-draft-get-fcc-list): Allow multiple Fcc folders.

wl/ChangeLog
wl/wl-draft.el
wl/wl-fldmgr.el

index 544cecd..16e68b9 100644 (file)
@@ -1,3 +1,10 @@
+2002-08-06  Yuuichi Teranishi  <teranisi@gohome.org>
+
+       * wl-fldmgr.el (wl-fldmgr-sort): Added optional argument.
+       If optional argument is specified, reverse sort order.
+
+       * wl-draft.el (wl-draft-get-fcc-list): Allow multiple Fcc folders.
+
 2002-07-24  Yuuichi Teranishi  <teranisi@gohome.org>
 
        * wl-thread.el (wl-thread-insert-message): Return parent number if
index 2e4dbf9..392af18 100644 (file)
@@ -1426,17 +1426,20 @@ If KILL-WHEN-DONE is non-nil, current draft buffer is killed"
       (save-excursion
        (goto-char (point-min))
        (while (re-search-forward "^Fcc:[ \t]*" header-end t)
-         (setq fcc-list
-               (cons (buffer-substring-no-properties
-                      (point)
-                      (progn
-                        (end-of-line)
-                        (skip-chars-backward " \t")
-                        (point)))
-                     fcc-list))
          (save-match-data
-           (wl-folder-confirm-existence
-            (wl-folder-get-elmo-folder (eword-decode-string (car fcc-list)))))
+           (setq fcc-list
+                 (append fcc-list
+                         (split-string
+                          (buffer-substring-no-properties
+                           (point)
+                           (progn
+                             (end-of-line)
+                             (skip-chars-backward " \t")
+                             (point)))
+                          ",[ \t]*")))
+           (dolist (folder fcc-list)
+             (wl-folder-confirm-existence
+              (wl-folder-get-elmo-folder (eword-decode-string folder)))))
          (delete-region (match-beginning 0)
                         (progn (forward-line 1) (point)))))
       fcc-list)))
index b572930..993fb78 100644 (file)
@@ -1035,8 +1035,8 @@ return value is diffs '(-new -unread -all)."
                                wl-fldmgr-make-filter-default)
                               "/" entity))))))
 
-(defun wl-fldmgr-sort ()
-  (interactive)
+(defun wl-fldmgr-sort (&optional arg)
+  (interactive "P")
   (save-excursion
     (beginning-of-line)
     (let ((inhibit-read-only t)
@@ -1049,10 +1049,10 @@ return value is diffs '(-new -unread -all)."
                      wl-folder-entity))
        (message "Sorting...")
        (setq flist (sort (nth 2 entity) wl-fldmgr-sort-function))
+       (when arg (setq flist (nreverse flist)))
        (setcar (cddr entity) flist)
        (wl-fldmgr-add-modified-access-list (car entity))
        (setq wl-fldmgr-modified t)
-       ;;
        (when (string= opened "-")
          (let (beg end)
            (setq beg (point))
@@ -1065,7 +1065,6 @@ return value is diffs '(-new -unread -all)."
                      (point))))
            (delete-region beg end)
            (wl-folder-insert-entity indent entity)))
-;;;    (wl-fldmgr-reconst-entity-hashtb t t)
        (message "Sorting...done")
        (set-buffer-modified-p nil)))))