diff options
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/mail/sendmail.el | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el index 0f2861f8868..ac8d3448759 100644 --- a/lisp/mail/sendmail.el +++ b/lisp/mail/sendmail.el | |||
| @@ -75,6 +75,9 @@ or t meaning should be initialized from `~/.mailrc'. | |||
| 75 | The alias definitions in `~/.mailrc' have this form: | 75 | The alias definitions in `~/.mailrc' have this form: |
| 76 | alias ALIAS MEANING") | 76 | alias ALIAS MEANING") |
| 77 | 77 | ||
| 78 | (defvar mail-alias-modtime nil | ||
| 79 | "The modification time of ~/.mailrc when it was last examined.") | ||
| 80 | |||
| 78 | (defvar mail-yank-prefix nil | 81 | (defvar mail-yank-prefix nil |
| 79 | "*Prefix insert on lines of yanked message being replied to. | 82 | "*Prefix insert on lines of yanked message being replied to. |
| 80 | nil means use indentation.") | 83 | nil means use indentation.") |
| @@ -158,7 +161,14 @@ actually occur.") | |||
| 158 | (defvar mail-send-hook nil | 161 | (defvar mail-send-hook nil |
| 159 | "Normal hook run before sending mail, in Mail mode.") | 162 | "Normal hook run before sending mail, in Mail mode.") |
| 160 | 163 | ||
| 164 | (defun synch-mail-aliases () | ||
| 165 | (let ((modtime (nth 5 (file-attributes "~/.mailrc")))) | ||
| 166 | (or (equal mail-alias-modtime modtime) | ||
| 167 | (setq mail-alias-modtime modtime | ||
| 168 | mail-aliases t)))) | ||
| 169 | |||
| 161 | (defun mail-setup (to subject in-reply-to cc replybuffer actions) | 170 | (defun mail-setup (to subject in-reply-to cc replybuffer actions) |
| 171 | (synch-mail-aliases) | ||
| 162 | (if (eq mail-aliases t) | 172 | (if (eq mail-aliases t) |
| 163 | (progn | 173 | (progn |
| 164 | (setq mail-aliases nil) | 174 | (setq mail-aliases nil) |
| @@ -402,6 +412,7 @@ the user from the mailer." | |||
| 402 | (replace-match "\n") | 412 | (replace-match "\n") |
| 403 | (backward-char 1) | 413 | (backward-char 1) |
| 404 | (setq delimline (point-marker)) | 414 | (setq delimline (point-marker)) |
| 415 | (synch-mail-aliases) | ||
| 405 | (if mail-aliases | 416 | (if mail-aliases |
| 406 | (expand-mail-aliases (point-min) delimline)) | 417 | (expand-mail-aliases (point-min) delimline)) |
| 407 | (goto-char (point-min)) | 418 | (goto-char (point-min)) |