changeset 10326:627063d29d25

(mail-personal-alias-file): New variable. Use globally in place of hardwired "~/.mailrc".
author Noah Friedman <friedman@splode.com>
date Tue, 03 Jan 1995 23:43:27 +0000
parents 070c1f54707b
children 8822b968b11c
files lisp/mail/sendmail.el
diffstat 1 files changed, 10 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mail/sendmail.el	Tue Jan 03 22:28:50 1995 +0000
+++ b/lisp/mail/sendmail.el	Tue Jan 03 23:43:27 1995 +0000
@@ -80,6 +80,13 @@
 feature from that of defining aliases in `.mailrc' to be expanded in Emacs.
 This variable has no effect unless your system uses sendmail as its mailer.")
 
+;;;###autoload
+(defvar mail-personal-alias-file "~/.mailrc"
+  "*If non-nil, the name of the user's personal mail alias file.
+This file typically should be in same format as the `.mailrc' file used by
+the `Mail' or `mailx' program.
+This file need not actually exist.")
+
 (defvar mail-aliases t
   "Alist of mail address aliases,
 or t meaning should be initialized from your mail aliases file.
@@ -119,7 +126,7 @@
 (defvar mail-mode-map nil)
 
 (autoload 'build-mail-aliases "mailalias"
-  "Read mail aliases from `~/.mailrc' and set `mail-aliases'."
+  "Read mail aliases from user's personal aliases file and set `mail-aliases'."
   nil)
 
 (autoload 'expand-mail-aliases "mailalias"
@@ -192,7 +199,7 @@
   "Normal hook run before sending mail, in Mail mode.")
 
 (defun sendmail-synch-aliases ()
-  (let ((modtime (nth 5 (file-attributes (or (getenv "MAILRC") "~/.mailrc")))))
+  (let ((modtime (nth 5 (file-attributes mail-personal-alias-file))))
     (or (equal mail-alias-modtime modtime)
 	(setq mail-alias-modtime modtime
 	      mail-aliases t))))
@@ -204,7 +211,7 @@
   (if (eq mail-aliases t)
       (progn
 	(setq mail-aliases nil)
-	(if (file-exists-p "~/.mailrc")
+	(if (file-exists-p mail-personal-alias-file)
 	    (build-mail-aliases))))
   (setq mail-send-actions actions)
   (setq mail-reply-buffer replybuffer)