[gnus git] branch master updated: m0-5-6-gae9aa67 =1= gnus.el, nnspool.el: Move some news variables from Emacs' paths.el

Katsumi Yamaoka <[email protected]>
Newsgroups gmane.emacs.gnus.cvs
Message-ID <[email protected]>
       via  ae9aa6784a1d1ec21d3c0778d987e9af5d06ce87 (commit)
      from  4bd325ec34ebf9a2f112044e8b0acb6891c9566e (commit)


- Log -----------------------------------------------------------------
commit ae9aa6784a1d1ec21d3c0778d987e9af5d06ce87
Author: Glenn Morris <[email protected]>
Date:   Thu May 24 22:53:13 2012 +0000

    gnus.el, nnspool.el: Move some news variables from Emacs' paths.el

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 71fdb99..d582c39 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,12 @@
+2012-05-24  Glenn Morris  <[email protected]>
+
+	* nnspool.el (news-directory, news-path, news-inews-program):
+	Move here from paths.el.  Don't see a need for these to be autoloaded.
+
+	* gnus.el (gnus-default-nntp-server): Make it a defcustom.
+	Merge in doc from paths.el version.  Don't see any need for this to be
+	autoloaded, or for the warning about users not setting it.
+
 2011-12-02  Wolfgang Jenkner  <[email protected]>
 
 	* gnus-agent.el (gnus-agent-save-active): Deal with the "groups"
diff --git a/lisp/gnus.el b/lisp/gnus.el
index 3d9ff80..5f8a71f 100644
--- a/lisp/gnus.el
+++ b/lisp/gnus.el
@@ -1272,15 +1272,18 @@ Set this variable in `.emacs' instead."
   :type '(choice (const :tag "current" nil)
 		 directory))
 
-;; Site dependent variables.  These variables should be defined in
-;; paths.el.
+;; Site dependent variables.
 
-(defvar gnus-default-nntp-server nil
-  "Specify a default NNTP server.
-This variable should be defined in paths.el, and should never be set
-by the user.
-If you want to change servers, you should use `gnus-select-method'.
-See the documentation to that variable.")
+;; Should this be obsolete?
+(defcustom gnus-default-nntp-server nil
+  "The hostname of the default NNTP server.
+The empty string, or nil, means to use the local host.
+You may wish to set this on a site-wide basis.
+
+If you want to change servers, you should use `gnus-select-method'."
+  :group 'gnus-server
+  :type '(choice (const :tag "local host" nil)
+                 (string :tag "host name")))
 
 (defcustom gnus-nntpserver-file "/etc/nntpserver"
   "A file with only the name of the nntp server in it."
@@ -1327,6 +1330,8 @@ If you use this variable, you must set `gnus-nntp-server' to nil.
 
 There is a lot more to know about select methods and virtual servers -
 see the manual for details."
+  ;; Emacs has set-after since 22.1.
+  ;set-after '(gnus-default-nntp-server)
   :group 'gnus-server
   :group 'gnus-start
   :initialize 'custom-initialize-default
diff --git a/lisp/nnspool.el b/lisp/nnspool.el
index 2b024e2..fd079d9 100644
--- a/lisp/nnspool.el
+++ b/lisp/nnspool.el
@@ -31,6 +31,25 @@
 (require 'nnoo)
 (eval-when-compile (require 'cl))
 
+;; Probably this entire thing should be obsolete.
+;; It's only used to init nnspool-spool-directory, so why not just
+;; set that variable's default directly?
+(defvar news-directory (if (file-exists-p "/usr/spool/news/")
+			   "/usr/spool/news/"
+			 "/var/spool/news/")
+  "The root directory below which all news files are stored.")
+(defvaralias 'news-path 'news-directory)
+
+;; Ditto re obsolescence.
+(defvar news-inews-program
+  (cond ((file-exists-p "/usr/bin/inews") "/usr/bin/inews")
+	((file-exists-p "/usr/local/inews") "/usr/local/inews")
+	((file-exists-p "/usr/local/bin/inews") "/usr/local/bin/inews")
+	((file-exists-p "/usr/contrib/lib/news/inews") "/usr/contrib/lib/news/inews")
+	((file-exists-p "/usr/lib/news/inews") "/usr/lib/news/inews")
+	(t "inews"))
+  "Program to post news.")
+
 (nnoo-declare nnspool)
 
 (defvoo nnspool-inews-program news-inews-program

-----------------------------------------------------------------------
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we listed those
revisions in full, above.

Summary of changes:
 lisp/ChangeLog  |   11 ++++++++++-
 lisp/gnus.el    |   21 +++++++++++++--------
 lisp/nnspool.el |   19 +++++++++++++++++++
 3 files changed, 42 insertions(+), 9 deletions(-)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnus Project".

The branch, master has been updated


hooks/post-receive
-- 
Gnus Project
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.