(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.
This commit is contained in:
parent
ca61e3875c
commit
680ebfa6ab
1 changed files with 7 additions and 2 deletions
|
@ -326,7 +326,12 @@ is less convenient."
|
||||||
:type '(choice (const nil) string)
|
:type '(choice (const nil) string)
|
||||||
:group 'mail)
|
: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.
|
"*Full mailing address of this user.
|
||||||
This is initialized based on `mail-host-address',
|
This is initialized based on `mail-host-address',
|
||||||
after your init file is read, in case it sets `mail-host-address'."
|
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'."
|
||||||
(set-language-environment current-language-environment)))
|
(set-language-environment current-language-environment)))
|
||||||
|
|
||||||
;; Do this here in case the init file sets mail-host-address.
|
;; 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) "@"
|
(setq user-mail-address (concat (user-login-name) "@"
|
||||||
(or mail-host-address
|
(or mail-host-address
|
||||||
(system-name)))))
|
(system-name)))))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue