From cee0c9967372fd59cb08630c1b28c3d3aa68cf83 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 22 Jul 2006 10:37:52 +0000 Subject: (user-mail-address): Initialize from the `EMAIL' environment variable first. Document this. (command-line): Ditto. --- lisp/startup.el | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'lisp/startup.el') diff --git a/lisp/startup.el b/lisp/startup.el index d41c812565f..cb6048728ab 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -247,14 +247,16 @@ this variable usefully is to set it while building and dumping Emacs." :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 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'." ;; 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 -- cgit v1.2.3