changeset 23996:aa6eab250ce8

(mspools-vm-system-mail): Provide an alternative value based on rmail-spool-directory if $MAIL is not defined.
author Stephen Eglen <stephen@gnu.org>
date Tue, 05 Jan 1999 09:46:03 +0000
parents a56b80c4166a
children bbe0c369b955
files lisp/mail/mspools.el
diffstat 1 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mail/mspools.el	Tue Jan 05 09:07:29 1999 +0000
+++ b/lisp/mail/mspools.el	Tue Jan 05 09:46:03 1999 +0000
@@ -142,11 +142,15 @@
   :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 @@
 
 (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"))