diff options
| author | Richard M. Stallman | 2002-09-29 17:53:58 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2002-09-29 17:53:58 +0000 |
| commit | 680ebfa6ab41cd394305d62d795a5a7dad070c5f (patch) | |
| tree | f91079b2e4ccc1a5f7c874411a54cb81d4dff0ad | |
| parent | ca61e3875c2a1595ae4cee158bcab04f1e757f5a (diff) | |
| download | emacs-680ebfa6ab41cd394305d62d795a5a7dad070c5f.tar.gz emacs-680ebfa6ab41cd394305d62d795a5a7dad070c5f.zip | |
(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.
| -rw-r--r-- | lisp/startup.el | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lisp/startup.el b/lisp/startup.el index 456eae5788c..3e1526b37a5 100644 --- a/lisp/startup.el +++ b/lisp/startup.el | |||
| @@ -326,7 +326,12 @@ is less convenient." | |||
| 326 | :type '(choice (const nil) string) | 326 | :type '(choice (const nil) string) |
| 327 | :group 'mail) | 327 | :group 'mail) |
| 328 | 328 | ||
| 329 | (defcustom user-mail-address nil | 329 | (defcustom user-mail-address (if command-line-processed |
| 330 | (concat (user-login-name) "@" | ||
| 331 | (or mail-host-address | ||
| 332 | (system-name))) | ||
| 333 | ;; Empty string means "not set yet". | ||
| 334 | "") | ||
| 330 | "*Full mailing address of this user. | 335 | "*Full mailing address of this user. |
| 331 | This is initialized based on `mail-host-address', | 336 | This is initialized based on `mail-host-address', |
| 332 | after your init file is read, in case it sets `mail-host-address'." | 337 | after your init file is read, in case it sets `mail-host-address'." |
| @@ -1007,7 +1012,7 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'." | |||
| 1007 | (set-language-environment current-language-environment))) | 1012 | (set-language-environment current-language-environment))) |
| 1008 | 1013 | ||
| 1009 | ;; Do this here in case the init file sets mail-host-address. | 1014 | ;; Do this here in case the init file sets mail-host-address. |
| 1010 | (or user-mail-address | 1015 | (or (equal user-mail-address "") |
| 1011 | (setq user-mail-address (concat (user-login-name) "@" | 1016 | (setq user-mail-address (concat (user-login-name) "@" |
| 1012 | (or mail-host-address | 1017 | (or mail-host-address |
| 1013 | (system-name))))) | 1018 | (system-name))))) |