Mercurial > emacs
changeset 72064:05f42d7646b5
(user-mail-address): Initialize from the `EMAIL' environment variable first.
Document this.
(command-line): Ditto.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Sat, 22 Jul 2006 10:37:12 +0000 |
parents | 52eeda6a8959 |
children | 3452d95c1265 |
files | lisp/startup.el |
diffstat | 1 files changed, 11 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/startup.el Fri Jul 21 22:54:40 2006 +0000 +++ b/lisp/startup.el Sat Jul 22 10:37:12 2006 +0000 @@ -247,14 +247,16 @@ :group 'mail) (defcustom user-mail-address (if command-line-processed - (concat (user-login-name) "@" - (or mail-host-address - (system-name))) + (or (getenv "EMAIL") + (concat (user-login-name) "@" + (or mail-host-address + (system-name)))) ;; Empty string means "not set yet". "") "*Full mailing address of this user. -This is initialized based on `mail-host-address', -after your init file is read, in case it sets `mail-host-address'." +This is initialized with environment variable `EMAIL' or, as a +fallback, using `mail-host-address'. This is done after your +init file is read, in case it sets `mail-host-address'." :type 'string :group 'mail) @@ -977,9 +979,10 @@ ;; Do this here in case the init file sets mail-host-address. (if (equal user-mail-address "") - (setq user-mail-address (concat (user-login-name) "@" - (or mail-host-address - (system-name))))) + (setq user-mail-address (or (getenv "EMAIL") + (concat (user-login-name) "@" + (or mail-host-address + (system-name)))))) ;; Originally face attributes were specified via ;; `font-lock-face-attributes'. Users then changed the default