aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/mail
diff options
context:
space:
mode:
authorKarl Heuer <[email protected]>1994-09-16 22:29:25 +0000
committerKarl Heuer <[email protected]>1994-09-16 22:29:25 +0000
commit9cc7519111b77a97d0116d3ededc0e686c395f6e (patch)
tree43cb1f8f8c0f136ccc7cd8b9bf052e29574b2767 /lisp/mail
parent594906dd80155d8b518a7b4a5d8fa51649c1684a (diff)
(mail-alias-modtime): New variable.
(synch-mail-aliases): New function. (mail-setup, sendmail-send-it): Synchronize cached list with file.
Diffstat (limited to 'lisp/mail')
-rw-r--r--lisp/mail/sendmail.el11
1 files changed, 11 insertions, 0 deletions
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el
index 0f2861f886..ac8d344875 100644
--- a/lisp/mail/sendmail.el
+++ b/lisp/mail/sendmail.el
@@ -75,6 +75,9 @@ or t meaning should be initialized from `~/.mailrc'.
The alias definitions in `~/.mailrc' have this form:
alias ALIAS MEANING")
+(defvar mail-alias-modtime nil
+ "The modification time of ~/.mailrc when it was last examined.")
+
(defvar mail-yank-prefix nil
"*Prefix insert on lines of yanked message being replied to.
nil means use indentation.")
@@ -158,7 +161,14 @@ actually occur.")
(defvar mail-send-hook nil
"Normal hook run before sending mail, in Mail mode.")
+(defun synch-mail-aliases ()
+ (let ((modtime (nth 5 (file-attributes "~/.mailrc"))))
+ (or (equal mail-alias-modtime modtime)
+ (setq mail-alias-modtime modtime
+ mail-aliases t))))
+
(defun mail-setup (to subject in-reply-to cc replybuffer actions)
+ (synch-mail-aliases)
(if (eq mail-aliases t)
(progn
(setq mail-aliases nil)
@@ -402,6 +412,7 @@ the user from the mailer."
(replace-match "\n")
(backward-char 1)
(setq delimline (point-marker))
+ (synch-mail-aliases)
(if mail-aliases
(expand-mail-aliases (point-min) delimline))
(goto-char (point-min))