diff lisp/startup.el @ 47688:8c15fbf63f95

(user-mail-address): Initialize to a useful value once Emacs is started up; initialize to "" at loadup time. (command-line): "", not nil, means user-mail-address not set yet.
author Richard M. Stallman <rms@gnu.org>
date Sun, 29 Sep 2002 17:53:58 +0000
parents 281edad1fc55
children ff9770dda600
line wrap: on
line diff
--- a/lisp/startup.el	Sun Sep 29 17:52:36 2002 +0000
+++ b/lisp/startup.el	Sun Sep 29 17:53:58 2002 +0000
@@ -326,7 +326,12 @@
   :type '(choice (const nil) string)
   :group 'mail)
 
-(defcustom user-mail-address nil
+(defcustom user-mail-address (if command-line-processed
+				 (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'."
@@ -1007,7 +1012,7 @@
 	(set-language-environment current-language-environment)))
     
     ;; Do this here in case the init file sets mail-host-address.
-    (or user-mail-address
+    (or (equal user-mail-address "")
 	(setq user-mail-address (concat (user-login-name) "@"
 					(or mail-host-address
 					    (system-name)))))