From 61a583cade865fa455cc4a533c44e48eb5ec9f30 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Thu, 24 May 2012 00:27:24 -0700 Subject: [PATCH] * paths.el (news-directory, news-path): Move to gnus/nnspool.el. * gnus/nnspool.el (news-directory, news-path): Move here from paths.el. Don't see a need for these to be autoloaded. This file is the only place that uses them, to init another variable. --- lisp/ChangeLog | 2 ++ lisp/gnus/ChangeLog | 3 +++ lisp/gnus/nnspool.el | 9 +++++++++ lisp/paths.el | 7 ------- 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 709d6ff728..5d065a617a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,7 @@ 2012-05-24 Glenn Morris + * paths.el (news-directory, news-path): Move to gnus/nnspool.el. + * paths.el (gnus-default-nntp-server): Remove (gnus.el defines it). * paths.el (rmail-file-name, rmail-spool-directory): Move from here... diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 4a5d86db12..f990c82e66 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,5 +1,8 @@ 2012-05-24 Glenn Morris + * nnspool.el (news-directory, news-path): 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. diff --git a/lisp/gnus/nnspool.el b/lisp/gnus/nnspool.el index 2b024e2074..3c197b92b2 100644 --- a/lisp/gnus/nnspool.el +++ b/lisp/gnus/nnspool.el @@ -31,6 +31,15 @@ (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) + (nnoo-declare nnspool) (defvoo nnspool-inews-program news-inews-program diff --git a/lisp/paths.el b/lisp/paths.el index f343809b79..ec5b3f4c5d 100644 --- a/lisp/paths.el +++ b/lisp/paths.el @@ -101,13 +101,6 @@ This variable `Info-default-directory-list' is used as the default for initializing `Info-directory-list' when Info is started, unless the environment variable INFOPATH is set.") -(defvar news-directory - (purecopy (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) - (defvar news-inews-program (purecopy (cond ((file-exists-p "/usr/bin/inews") "/usr/bin/inews") -- 2.39.2