diff options
author | Noah Friedman <friedman@splode.com> | 1995-01-03 23:43:27 +0000 |
---|---|---|
committer | Noah Friedman <friedman@splode.com> | 1995-01-03 23:43:27 +0000 |
commit | 8790b6984afaf67c0780cd3f99b785d20ba1aabc (patch) | |
tree | acc4f645d7bfae89aaee92fc697f55873ca2ed9c /lisp/mail/sendmail.el | |
parent | c0bcb2393b65411a747b0cd33394098bfd07ea57 (diff) | |
download | emacs-8790b6984afaf67c0780cd3f99b785d20ba1aabc.tar.gz emacs-8790b6984afaf67c0780cd3f99b785d20ba1aabc.tar.bz2 emacs-8790b6984afaf67c0780cd3f99b785d20ba1aabc.zip |
(mail-personal-alias-file): New variable.
Use globally in place of hardwired "~/.mailrc".
Diffstat (limited to 'lisp/mail/sendmail.el')
-rw-r--r-- | lisp/mail/sendmail.el | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el index cde6c9e894c..9287b18d4bd 100644 --- a/lisp/mail/sendmail.el +++ b/lisp/mail/sendmail.el @@ -80,6 +80,13 @@ This file defines aliases to be expanded by the mailer; this is a different 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 @@ instead of no action.") (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 @@ actually occur.") "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 @@ actually occur.") (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) |