diff options
author | Richard M. Stallman <rms@gnu.org> | 1994-06-27 23:07:15 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1994-06-27 23:07:15 +0000 |
commit | 0086b593a74cf5c597c76383600bf3d7cbcdb127 (patch) | |
tree | a9e191c0277608a2d0796cf1c75f3a848bc9d969 /lisp/gnuspost.el | |
parent | dfbf6104bdc9ce794199c9a5d49c45d9c910362e (diff) | |
download | emacs-0086b593a74cf5c597c76383600bf3d7cbcdb127.tar.gz |
(gnus-inews-user-name, gnus-inews-domain-name):
Use user-mail-address unless there's a reason to do otherwise.
(gnus-inews-domain-name): Delete compatibility use of gnus-your-domain.
Diffstat (limited to 'lisp/gnuspost.el')
-rw-r--r-- | lisp/gnuspost.el | 63 |
1 files changed, 30 insertions, 33 deletions
diff --git a/lisp/gnuspost.el b/lisp/gnuspost.el index 5c366748b7f..c5f44934914 100644 --- a/lisp/gnuspost.el +++ b/lisp/gnuspost.el @@ -629,10 +629,13 @@ a program specified by the rest of the value." )) (defun gnus-inews-user-name () - "Return user's network address as `NAME@DOMAIN (FULL NAME)'." - (let ((login-name (gnus-inews-login-name)) - (full-name (gnus-inews-full-name))) - (concat login-name "@" (gnus-inews-domain-name gnus-use-generic-from) + "Return user's network address as `NAME@DOMAIN (FULLNAME)'." + (let ((full-name (gnus-inews-full-name))) + (concat (if (or gnus-user-login-name gnus-use-generic-from + gnus-local-domain (getenv "DOMAINNAME")) + (concat (gnus-inews-login-name) "@" + (gnus-inews-domain-name gnus-use-generic-from)) + user-mail-address) ;; User's full name. (cond ((string-equal full-name "") "") ((string-equal full-name "&") ;Unix hack. @@ -649,8 +652,8 @@ Got from the variable `gnus-user-login-name' and the function (defun gnus-inews-full-name () "Return user full name. -Got from the variable gnus-user-full-name, the environment variable -NAME, and the function user-full-name." +Got from the variable `gnus-user-full-name', the environment variable +NAME, and the function `user-full-name'." (or gnus-user-full-name (getenv "NAME") (user-full-name))) @@ -660,33 +663,27 @@ If optional argument GENERICFROM is a string, use it as the domain name; if it is non-nil, strip of local host name from the domain name. If the function `system-name' returns full internet name and the domain is undefined, the domain name is got from it." - ;; Note: compatibility hack. This will be removed in the next version. - (and (null gnus-local-domain) - (boundp 'gnus-your-domain) - (setq gnus-local-domain gnus-your-domain)) - ;; End of compatibility hack. - (let ((domain (or (if (stringp genericfrom) genericfrom) - (getenv "DOMAINNAME") - gnus-local-domain - ;; Function `system-name' may return full internet name. - ;; Suggested by Mike DeCorte <mrd@sun.soe.clarkson.edu>. - (if (string-match "\\." (system-name)) - (substring (system-name) (match-end 0))) - (read-string "Domain name (no host): "))) - (host (or (if (string-match "\\." (system-name)) - (substring (system-name) 0 (match-beginning 0))) - (system-name)))) - (if (string-equal "." (substring domain 0 1)) - (setq domain (substring domain 1))) - (if (null gnus-local-domain) - (setq gnus-local-domain domain)) - ;; Support GENERICFROM as same as standard Bnews system. - ;; Suggested by ohm@kaba.junet and vixie@decwrl.dec.com. - (cond ((null genericfrom) - (concat host "." domain)) - ;;((stringp genericfrom) genericfrom) - (t domain)) - )) + (if (or genericfrom gnus-local-domain (getenv "DOMAINNAME")) + (let ((domain (or (if (stringp genericfrom) genericfrom) + (getenv "DOMAINNAME") + gnus-local-domain + ;; Function `system-name' may return full internet name. + ;; Suggested by Mike DeCorte <mrd@sun.soe.clarkson.edu>. + (if (string-match "\\." (system-name)) + (substring (system-name) (match-end 0))) + (read-string "Domain name (no host): "))) + (host (or (if (string-match "\\." (system-name)) + (substring (system-name) 0 (match-beginning 0))) + (system-name)))) + (if (string-equal "." (substring domain 0 1)) + (setq domain (substring domain 1))) + ;; Support GENERICFROM as same as standard Bnews system. + ;; Suggested by ohm@kaba.junet and vixie@decwrl.dec.com. + (cond ((null genericfrom) + (concat host "." domain)) + ;;((stringp genericfrom) genericfrom) + (t domain))) + (substring user-mail-address (1+ (string-match "@" user-mail-address))))) (defun gnus-inews-message-id () "Generate unique Message-ID for user." |