diff options
| author | Noah Friedman | 1995-01-03 23:43:47 +0000 |
|---|---|---|
| committer | Noah Friedman | 1995-01-03 23:43:47 +0000 |
| commit | 9d73ab0d9d309a7ccc0a3bd8180e81febd160712 (patch) | |
| tree | 1a4ab868a926d1fb1d2484fe8f624fa3dda36f35 | |
| parent | 8790b6984afaf67c0780cd3f99b785d20ba1aabc (diff) | |
| download | emacs-9d73ab0d9d309a7ccc0a3bd8180e81febd160712.tar.gz emacs-9d73ab0d9d309a7ccc0a3bd8180e81febd160712.zip | |
Use `mail-personal-alias-file' globally in place of hardwired "~/.mailrc".
| -rw-r--r-- | lisp/mail/mailalias.el | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lisp/mail/mailalias.el b/lisp/mail/mailalias.el index ca788757cf1..84f12876eb6 100644 --- a/lisp/mail/mailalias.el +++ b/lisp/mail/mailalias.el | |||
| @@ -101,10 +101,12 @@ removed from alias expansions." | |||
| 101 | (set-marker end1 nil))) | 101 | (set-marker end1 nil))) |
| 102 | (set-marker end nil))) | 102 | (set-marker end nil))) |
| 103 | 103 | ||
| 104 | ;; Called by mail-setup, or similar functions, only if ~/.mailrc exists. | 104 | ;; Called by mail-setup, or similar functions, only if the file specified |
| 105 | ;; by mail-personal-alias-file (usually `~/.mailrc') exists. | ||
| 105 | (defun build-mail-aliases (&optional file) | 106 | (defun build-mail-aliases (&optional file) |
| 106 | "Read mail aliases from `~/.mailrc' and set `mail-aliases'." | 107 | "Read mail aliases from personal aliases file and set `mail-aliases'. |
| 107 | (setq file (expand-file-name (or file (or (getenv "MAILRC") "~/.mailrc")))) | 108 | By default, this is the file specified by `mail-personal-alias-file'." |
| 109 | (setq file (expand-file-name (or file mail-personal-alias-file))) | ||
| 108 | (let ((buffer nil) | 110 | (let ((buffer nil) |
| 109 | (obuf (current-buffer))) | 111 | (obuf (current-buffer))) |
| 110 | (unwind-protect | 112 | (unwind-protect |
| @@ -170,7 +172,7 @@ An address can contain spaces if it is quoted with double-quotes." | |||
| 170 | (if (eq mail-aliases t) | 172 | (if (eq mail-aliases t) |
| 171 | (progn | 173 | (progn |
| 172 | (setq mail-aliases nil) | 174 | (setq mail-aliases nil) |
| 173 | (if (file-exists-p (or (getenv "MAILRC") "~/.mailrc")) | 175 | (if (file-exists-p mail-personal-alias-file) |
| 174 | (build-mail-aliases)))) | 176 | (build-mail-aliases)))) |
| 175 | ;; strip garbage from front and end | 177 | ;; strip garbage from front and end |
| 176 | (if (string-match "\\`[ \t\n,]+" definition) | 178 | (if (string-match "\\`[ \t\n,]+" definition) |