From: Glenn Morris Date: Thu, 24 May 2012 22:53:13 +0000 (+0000) Subject: gnus.el, nnspool.el: Move some news variables from Emacs' paths.el X-Git-Url: http://cgit.sxemacs.org/?p=gnus;a=commitdiff_plain;h=ae9aa6784a1d1ec21d3c0778d987e9af5d06ce87 gnus.el, nnspool.el: Move some news variables from Emacs' paths.el --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 71fdb9956..d582c39c8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,12 @@ +2012-05-24 Glenn Morris + + * 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 * gnus-agent.el (gnus-agent-save-active): Deal with the "groups" @@ -24627,7 +24636,7 @@ See ChangeLog.2 for earlier changes. - Copyright (C) 2004-2012 Free Software Foundation, Inc. + Copyright (C) 2004-2012 Free Software Foundation, Inc. This file is part of GNU Emacs. diff --git a/lisp/gnus.el b/lisp/gnus.el index 3d9ff80a7..5f8a71f3d 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 2b024e207..fd079d909 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