summaryrefslogtreecommitdiff
path: root/lisp/mail/mspools.el
diff options
context:
space:
mode:
authorStephen Eglen <stephen@gnu.org>1999-01-05 09:46:03 +0000
committerStephen Eglen <stephen@gnu.org>1999-01-05 09:46:03 +0000
commitfd202b85297512b2b7914d44a239dd9419bfa36f (patch)
tree1fd55390e5308ade7e3639366f8344be190e7b48 /lisp/mail/mspools.el
parent921759ee11f81bc39e75aafbcd33528dbc92866b (diff)
downloademacs-fd202b85297512b2b7914d44a239dd9419bfa36f.tar.gz
(mspools-vm-system-mail): Provide an alternative value based on
rmail-spool-directory if $MAIL is not defined.
Diffstat (limited to 'lisp/mail/mspools.el')
-rw-r--r--lisp/mail/mspools.el10
1 files changed, 7 insertions, 3 deletions
diff --git a/lisp/mail/mspools.el b/lisp/mail/mspools.el
index 0c8d923f006..5ddd4e3f9ad 100644
--- a/lisp/mail/mspools.el
+++ b/lisp/mail/mspools.el
@@ -142,11 +142,15 @@ Defaults to `vm-folder-directory' if bound else to ~/MAIL/."
:type 'directory
:group 'mspools)
-(defcustom mspools-vm-system-mail (getenv "MAIL")
+(defcustom mspools-vm-system-mail (or (getenv "MAIL")
+ (concat rmail-spool-directory
+ (user-login-name)))
"*Spool file for main mailbox. Only used by VM.
This needs to be set to your primary mail spool - mspools will not run
without it. By default this will be set to the environment variable
-$MAIL. Otherwise set it to something like /usr/spool/mail/login-name."
+$MAIL. Otherwise it will use `rmail-spool-directory' to guess where
+your primary spool is. If this fails, set it to something like
+/usr/spool/mail/login-name."
:type 'file
:group 'mspools)
@@ -179,7 +183,7 @@ $MAIL. Otherwise set it to something like /usr/spool/mail/login-name."
(defun mspools-set-vm-spool-files ()
"Set value of `vm-spool-files'. Only needed for VM."
- (if (null mspools-vm-system-mail)
+ (if (not (file-readable-p mspools-vm-system-mail))
(error "Need to set mspools-vm-system-mail to the spool for primary inbox"))
(if (null mspools-folder-directory)
(error "Set `mspools-folder-directory' to where the spool files are"))