aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1994-06-27 23:07:15 +0000
committerRichard M. Stallman1994-06-27 23:07:15 +0000
commit0086b593a74cf5c597c76383600bf3d7cbcdb127 (patch)
treea9e191c0277608a2d0796cf1c75f3a848bc9d969
parentdfbf6104bdc9ce794199c9a5d49c45d9c910362e (diff)
downloademacs-0086b593a74cf5c597c76383600bf3d7cbcdb127.tar.gz
emacs-0086b593a74cf5c597c76383600bf3d7cbcdb127.zip
(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.
-rw-r--r--lisp/gnuspost.el63
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."
629 )) 629 ))
630 630
631(defun gnus-inews-user-name () 631(defun gnus-inews-user-name ()
632 "Return user's network address as `NAME@DOMAIN (FULL NAME)'." 632 "Return user's network address as `NAME@DOMAIN (FULLNAME)'."
633 (let ((login-name (gnus-inews-login-name)) 633 (let ((full-name (gnus-inews-full-name)))
634 (full-name (gnus-inews-full-name))) 634 (concat (if (or gnus-user-login-name gnus-use-generic-from
635 (concat login-name "@" (gnus-inews-domain-name gnus-use-generic-from) 635 gnus-local-domain (getenv "DOMAINNAME"))
636 (concat (gnus-inews-login-name) "@"
637 (gnus-inews-domain-name gnus-use-generic-from))
638 user-mail-address)
636 ;; User's full name. 639 ;; User's full name.
637 (cond ((string-equal full-name "") "") 640 (cond ((string-equal full-name "") "")
638 ((string-equal full-name "&") ;Unix hack. 641 ((string-equal full-name "&") ;Unix hack.
@@ -649,8 +652,8 @@ Got from the variable `gnus-user-login-name' and the function
649 652
650(defun gnus-inews-full-name () 653(defun gnus-inews-full-name ()
651 "Return user full name. 654 "Return user full name.
652Got from the variable gnus-user-full-name, the environment variable 655Got from the variable `gnus-user-full-name', the environment variable
653NAME, and the function user-full-name." 656NAME, and the function `user-full-name'."
654 (or gnus-user-full-name 657 (or gnus-user-full-name
655 (getenv "NAME") (user-full-name))) 658 (getenv "NAME") (user-full-name)))
656 659
@@ -660,33 +663,27 @@ If optional argument GENERICFROM is a string, use it as the domain
660name; if it is non-nil, strip of local host name from the domain name. 663name; if it is non-nil, strip of local host name from the domain name.
661If the function `system-name' returns full internet name and the 664If the function `system-name' returns full internet name and the
662domain is undefined, the domain name is got from it." 665domain is undefined, the domain name is got from it."
663 ;; Note: compatibility hack. This will be removed in the next version. 666 (if (or genericfrom gnus-local-domain (getenv "DOMAINNAME"))
664 (and (null gnus-local-domain) 667 (let ((domain (or (if (stringp genericfrom) genericfrom)
665 (boundp 'gnus-your-domain) 668 (getenv "DOMAINNAME")
666 (setq gnus-local-domain gnus-your-domain)) 669 gnus-local-domain
667 ;; End of compatibility hack. 670 ;; Function `system-name' may return full internet name.
668 (let ((domain (or (if (stringp genericfrom) genericfrom) 671 ;; Suggested by Mike DeCorte <mrd@sun.soe.clarkson.edu>.
669 (getenv "DOMAINNAME") 672 (if (string-match "\\." (system-name))
670 gnus-local-domain 673 (substring (system-name) (match-end 0)))
671 ;; Function `system-name' may return full internet name. 674 (read-string "Domain name (no host): ")))
672 ;; Suggested by Mike DeCorte <mrd@sun.soe.clarkson.edu>. 675 (host (or (if (string-match "\\." (system-name))
673 (if (string-match "\\." (system-name)) 676 (substring (system-name) 0 (match-beginning 0)))
674 (substring (system-name) (match-end 0))) 677 (system-name))))
675 (read-string "Domain name (no host): "))) 678 (if (string-equal "." (substring domain 0 1))
676 (host (or (if (string-match "\\." (system-name)) 679 (setq domain (substring domain 1)))
677 (substring (system-name) 0 (match-beginning 0))) 680 ;; Support GENERICFROM as same as standard Bnews system.
678 (system-name)))) 681 ;; Suggested by ohm@kaba.junet and vixie@decwrl.dec.com.
679 (if (string-equal "." (substring domain 0 1)) 682 (cond ((null genericfrom)
680 (setq domain (substring domain 1))) 683 (concat host "." domain))
681 (if (null gnus-local-domain) 684 ;;((stringp genericfrom) genericfrom)
682 (setq gnus-local-domain domain)) 685 (t domain)))
683 ;; Support GENERICFROM as same as standard Bnews system. 686 (substring user-mail-address (1+ (string-match "@" user-mail-address)))))
684 ;; Suggested by ohm@kaba.junet and vixie@decwrl.dec.com.
685 (cond ((null genericfrom)
686 (concat host "." domain))
687 ;;((stringp genericfrom) genericfrom)
688 (t domain))
689 ))
690 687
691(defun gnus-inews-message-id () 688(defun gnus-inews-message-id ()
692 "Generate unique Message-ID for user." 689 "Generate unique Message-ID for user."