* wl-utils.el (wl-collect-draft): New function.
* wl-folder.el (wl-folder-suspend): Put summary buffers
and draft buffers at the end of buffer list.
* wl-draft.el (wl-jump-to-draft-folder): Use `wl-collect-draft'.
+2002-04-03 Kenichi OKADA <okada@opaopa.org>
+
+ * wl.el (wl): Do not check variables if check is nil.
+ * wl-utils.el (wl-collect-draft): New function.
+ * wl-folder.el (wl-folder-suspend): Put summary buffers
+ and draft buffers at the end of buffer list.
+ * wl-draft.el (wl-jump-to-draft-folder): Use `wl-collect-draft'.
+
2002-04-02 Hiroya Murata <lapis-lazuli@pop06.odn.ne.jp>
* wl-message.el (wl-message-buffer-prefetch-get-next): Use while
(interactive "P")
(if arg
(wl-jump-to-draft-folder)
- (let ((bufs (buffer-list))
- (draft-regexp (concat
- "^" (regexp-quote
- (elmo-localdir-folder-directory-internal
- (wl-folder-get-elmo-folder wl-draft-folder)))))
- buf draft-bufs)
- (while bufs
- (if (and
- (setq buf (with-current-buffer (car bufs)
- wl-draft-buffer-file-name))
- (string-match draft-regexp buf))
- (setq draft-bufs (cons (buffer-name (car bufs)) draft-bufs)))
- (setq bufs (cdr bufs)))
+ (let ((draft-bufs (wl-collect-draft))
+ buf)
(cond
((null draft-bufs)
(message "No draft buffer exist."))
(t
(setq draft-bufs
- (sort draft-bufs (function (lambda (a b) (not (string< a b))))))
- (if (setq buf (cdr (member (buffer-name) draft-bufs)))
+ (sort (mapcar 'buffer-name draft-bufs)
+ (function (lambda (a b)
+ (not (string< a b))))))
+ (if (setq buf (cdr (member (buffer-name)
+ draft-bufs)))
(setq buf (car buf))
(setq buf (car draft-bufs)))
(switch-to-buffer buf))))))
;(if (fboundp 'mmelmo-cleanup-entity-buffers)
;(mmelmo-cleanup-entity-buffers))
(bury-buffer wl-folder-buffer-name)
+ (dolist (summary-buf (wl-collect-summary))
+ (bury-buffer summary-buf))
+ (dolist (draft-buf (wl-collect-draft))
+ (bury-buffer draft-buf))
(delete-windows-on wl-folder-buffer-name t))
(defun wl-folder-info-save ()
(buffer-list))
result))
+(defun wl-collect-draft ()
+ (let ((draft-regexp (concat
+ "^" (regexp-quote
+ (elmo-localdir-folder-directory-internal
+ (wl-folder-get-elmo-folder wl-draft-folder)))))
+ result buf)
+ (mapcar
+ (function (lambda (x)
+ (if (and
+ (setq buf (with-current-buffer x
+ wl-draft-buffer-file-name))
+ (string-match draft-regexp buf))
+ (setq result (nconc result (list x))))))
+ (buffer-list))
+ result))
+
(static-if (fboundp 'read-directory-name)
(defalias 'wl-read-directory-name 'read-directory-name)
(defun wl-read-directory-name (prompt dir)
(progn
(message "Checking environment...")
(wl-check-environment arg)
- (message "Checking environment...done")))
- (message "Checking type of variables...")
- (wl-check-variables)
- (wl-check-variables-2)
- (message "Checking type of variables...done")
+ (message "Checking environment...done")
+ (message "Checking type of variables...")
+ (wl-check-variables)
+ (wl-check-variables-2)
+ (message "Checking type of variables...done")))
(wl-plugged-init (wl-folder arg))
(unless arg
(run-hooks 'wl-auto-check-folder-pre-hook)