;;; wl.el -- Wanderlust bootstrap.
-;; Copyright 1998,1999,2000 Yuuichi Teranishi <teranisi@gohome.org>
-;; Masahiro MURATA <muse@ba2.so-net.ne.jp>
+;; Copyright (C) 1998,1999,2000 Yuuichi Teranishi <teranisi@gohome.org>
+;; Copyright (C) 1998,1999,2000 Masahiro MURATA <muse@ba2.so-net.ne.jp>
;; Author: Yuuichi Teranishi <teranisi@gohome.org>
-;; Masahiro MURATA <muse@ba2.so-net.ne.jp>
+;; Masahiro MURATA <muse@ba2.so-net.ne.jp>
;; Keywords: mail, net news
;; This file is part of Wanderlust (Yet Another Message Interface on Emacsen).
;;
(require 'elmo2)
+(require 'wl-version) ; reduce recursive-load-depth
+
;; from x-face.el
(unless (and (fboundp 'defgroup)
(fboundp 'defcustom))
(require 'wl-vars)
(require 'wl-util)
-(require 'wl-version)
(cond (wl-on-xemacs
(require 'wl-xmas))
(t
(require 'wl-mule)))
-(provide 'wl) ; circular dependency
+(provide 'wl) ; circular dependency
(require 'wl-folder)
(require 'wl-summary)
(require 'wl-thread)
(progn
;; flush queue!!
(elmo-dop-queue-flush)
- (wl-biff-start)
+ (unless queue-flush-only (wl-biff-start))
(if (and wl-draft-enable-queuing
wl-auto-flush-queue)
(wl-draft-queue-flush))
(defun wl-save ()
"Save summary and folder status."
(interactive)
- (wl-save-status 'keep-summary))
+ (wl-save-status 'keep-summary)
+ (run-hooks 'wl-save-hook))
(defun wl-save-status (&optional keep-summary)
(message "Saving summary and folder status...")
(defun wl-exit ()
(interactive)
(when (or (not wl-interactive-exit)
- (y-or-n-p "Quit Wanderlust?"))
+ (y-or-n-p "Quit Wanderlust? "))
(elmo-quit)
(wl-biff-stop)
(run-hooks 'wl-exit-hook)
(elmo-buffer-cache-clean-up)
(if (fboundp 'mmelmo-cleanup-entity-buffers)
(mmelmo-cleanup-entity-buffers))
+ (if (and wl-folder-use-frame
+ (> (length (visible-frame-list)) 1))
+ (delete-frame))
(setq wl-init nil)
(unless wl-on-nemacs
(remove-hook 'kill-emacs-hook 'wl-save-status))
(kill-buffer demo-buf))
(if succeed
(setq wl-init t))
+ ;; This hook may contain the functions `wl-plugged-init-icons' and
+ ;; `wl-biff-init-icons' for reasons of system internal to accord
+ ;; facilities for the Emacs variants.
(run-hooks 'wl-init-hook)))))
(defun wl-check-environment (no-check-folder)
(unless (featurep 'mime-setup)
(require 'mime-setup))
- (unless wl-from
- (error "Please set `wl-from'"))
+ (unless wl-from (error "Please set `wl-from'"))
+ ;; Message-ID
(unless (string-match "[^.]\\.[^.]" (or wl-message-id-domain
(if wl-local-domain
(concat (system-name)
"." wl-local-domain)
(system-name))))
(error "Please remove `@' from `wl-message-id-domain'"))
+ (if (string= wl-local-domain "localdomain")
+ (error "Please set `wl-local-domain'"))
+ (if (string= wl-message-id-domain "localhost.localdomain")
+ (error "Please set `wl-message-id-domain'"))
+ ;; folders
(when (not no-check-folder)
(if (not (eq (elmo-folder-get-type wl-draft-folder) 'localdir))
(error "%s is not allowed for draft folder" wl-draft-folder))
(unless (elmo-folder-exists-p wl-draft-folder)
(if (y-or-n-p
- (format "Draft Folder %s does not exist, create it?"
+ (format "Draft Folder %s does not exist, create it? "
wl-draft-folder))
(elmo-create-folder wl-draft-folder)
(error "Draft Folder is not created")))
(if (and wl-draft-enable-queuing
(not (elmo-folder-exists-p wl-queue-folder)))
(if (y-or-n-p
- (format "Queue Folder %s does not exist, create it?"
+ (format "Queue Folder %s does not exist, create it? "
wl-queue-folder))
(elmo-create-folder wl-queue-folder)
(error "Queue Folder is not created"))))
(when (not (eq no-check-folder 'wl-draft))
(unless (elmo-folder-exists-p wl-trash-folder)
(if (y-or-n-p
- (format "Trash Folder %s does not exist, create it?"
+ (format "Trash Folder %s does not exist, create it? "
wl-trash-folder))
(elmo-create-folder wl-trash-folder)
(error "Trash Folder is not created")))
(unless (elmo-folder-exists-p elmo-lost+found-folder)
(elmo-create-folder elmo-lost+found-folder)))
+ ;; tmp dir
(unless (file-exists-p wl-tmp-dir)
(if (y-or-n-p
- (format "Temp directory (to save multipart) %s does not exist, create it now?"
+ (format "Temp directory (to save multipart) %s does not exist, create it now? "
wl-tmp-dir))
(make-directory wl-tmp-dir)
(error "Temp directory is not created"))))
;;;###autoload
(defun wl (&optional arg)
"Start Wanderlust -- Yet Another Message Interface On Emacsen.
-If prefix argument is specified, folder checkings are skipped."
+If ARG (prefix argument) is specified, folder checkings are skipped."
(interactive "P")
(or wl-init (wl-load-profile))
(unwind-protect
(wl-plugged-init (wl-folder arg))
(sit-for 0))
(unwind-protect
- (unless arg
+ (unless arg
(run-hooks 'wl-auto-check-folder-pre-hook)
(wl-folder-auto-check)
(run-hooks 'wl-auto-check-folder-hook))