diff options
| author | Eli Zaretskii | 2006-07-22 10:37:52 +0000 |
|---|---|---|
| committer | Eli Zaretskii | 2006-07-22 10:37:52 +0000 |
| commit | cee0c9967372fd59cb08630c1b28c3d3aa68cf83 (patch) | |
| tree | 68cea99f1ce1dddfe809127fffc814b018f3c956 | |
| parent | 46ab76918c134310e1a6e942a454fb1cd0cb3e61 (diff) | |
| download | emacs-cee0c9967372fd59cb08630c1b28c3d3aa68cf83.tar.gz emacs-cee0c9967372fd59cb08630c1b28c3d3aa68cf83.zip | |
(user-mail-address): Initialize from the `EMAIL' environment variable first.
Document this.
(command-line): Ditto.
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/startup.el | 19 |
2 files changed, 17 insertions, 8 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a7b5ca1f329..d49a24a0e8e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2006-07-22 Micha,Ak(Bl Cadilhac <michael.cadilhac@lrde.org> | ||
| 2 | |||
| 3 | * startup.el (user-mail-address): Initialize from the `EMAIL' | ||
| 4 | environment variable first. Document this. | ||
| 5 | (command-line): Ditto. | ||
| 6 | |||
| 1 | 2006-07-22 Nick Roberts <nickrob@snap.net.nz> | 7 | 2006-07-22 Nick Roberts <nickrob@snap.net.nz> |
| 2 | 8 | ||
| 3 | * help-mode.el (help-function-def, help-variable-def) | 9 | * help-mode.el (help-function-def, help-variable-def) |
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." | |||
| 247 | :group 'mail) | 247 | :group 'mail) |
| 248 | 248 | ||
| 249 | (defcustom user-mail-address (if command-line-processed | 249 | (defcustom user-mail-address (if command-line-processed |
| 250 | (concat (user-login-name) "@" | 250 | (or (getenv "EMAIL") |
| 251 | (or mail-host-address | 251 | (concat (user-login-name) "@" |
| 252 | (system-name))) | 252 | (or mail-host-address |
| 253 | (system-name)))) | ||
| 253 | ;; Empty string means "not set yet". | 254 | ;; Empty string means "not set yet". |
| 254 | "") | 255 | "") |
| 255 | "*Full mailing address of this user. | 256 | "*Full mailing address of this user. |
| 256 | This is initialized based on `mail-host-address', | 257 | This is initialized with environment variable `EMAIL' or, as a |
| 257 | after your init file is read, in case it sets `mail-host-address'." | 258 | fallback, using `mail-host-address'. This is done after your |
| 259 | init file is read, in case it sets `mail-host-address'." | ||
| 258 | :type 'string | 260 | :type 'string |
| 259 | :group 'mail) | 261 | :group 'mail) |
| 260 | 262 | ||
| @@ -977,9 +979,10 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'." | |||
| 977 | 979 | ||
| 978 | ;; Do this here in case the init file sets mail-host-address. | 980 | ;; Do this here in case the init file sets mail-host-address. |
| 979 | (if (equal user-mail-address "") | 981 | (if (equal user-mail-address "") |
| 980 | (setq user-mail-address (concat (user-login-name) "@" | 982 | (setq user-mail-address (or (getenv "EMAIL") |
| 981 | (or mail-host-address | 983 | (concat (user-login-name) "@" |
| 982 | (system-name))))) | 984 | (or mail-host-address |
| 985 | (system-name)))))) | ||
| 983 | 986 | ||
| 984 | ;; Originally face attributes were specified via | 987 | ;; Originally face attributes were specified via |
| 985 | ;; `font-lock-face-attributes'. Users then changed the default | 988 | ;; `font-lock-face-attributes'. Users then changed the default |