# HG changeset patch # User Eli Zaretskii # Date 1153564632 0 # Node ID 05f42d7646b51af28b7bd7f5beb8e60a085de4fe # Parent 52eeda6a89598393245dfd182d4d7fe0aa375dbb (user-mail-address): Initialize from the `EMAIL' environment variable first. Document this. (command-line): Ditto. diff -r 52eeda6a8959 -r 05f42d7646b5 lisp/startup.el --- 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