From: yamaoka Date: Wed, 13 Jun 2001 13:29:30 +0000 (+0000) Subject: * nnshimbun.el (nnshimbun-group-parameters): New group parameter. X-Git-Tag: t-gnus-6_15_4-02-quimby~6 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=ab1a8deed626654a0a325b3d6529ffe43fb6c38d;p=elisp%2Fgnus.git- * nnshimbun.el (nnshimbun-group-parameters): New group parameter. It also provides the user option `nnshimbun-group-parameters-alist' and the function `nnshimbun-find-group-parameters'. (nnshimbun-group-parameters-custom): New variable. (TopLevel): Require `gnus' expressly. --- diff --git a/ChangeLog b/ChangeLog index 617277d..0ba0a35 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2001-06-13 Katsumi Yamaoka + + * lisp/nnshimbun.el (nnshimbun-group-parameters): New group + parameter. It also provides the user option + `nnshimbun-group-parameters-alist' and the function + `nnshimbun-find-group-parameters'. + (nnshimbun-group-parameters-custom): New variable. + (TopLevel): Require `gnus' expressly. + 2001-06-12 TSUCHIYA Masatoshi * lisp/nnshimbun.el (nnshimbun-find-parameter): New macro. diff --git a/lisp/nnshimbun.el b/lisp/nnshimbun.el index 325c8f6..6d6044f 100644 --- a/lisp/nnshimbun.el +++ b/lisp/nnshimbun.el @@ -47,6 +47,7 @@ (require 'nnheader) (require 'nnmail) (require 'nnoo) +(require 'gnus) (require 'gnus-bcklg) (require 'shimbun) (require 'message) @@ -57,6 +58,79 @@ "Reading Web Newspapers with Gnus." :group 'gnus) +(defvar nnshimbun-group-parameters-custom + '(list :format "%v" + (checklist :inline t + (list :inline t :format "%v" + (const :format "" index-range) + (choice :tag "Index range" + :value all + (const all) + (const last) + (integer :tag "days"))) + (list :inline t :format "%v" + (const :format "" prefetch-articles) + (boolean :tag "Prefetch articles" + :on "on" + :off "off")) + (list :inline t :format "%v" + (const :format "" expiry-wait) + (choice :tag "Expire wait" + :value never + (const never) + (const immediate) + (number :tag "days")))) + (repeat :inline t :tag "Others" + (list :inline t :format "%v" + (symbol :tag "Keyword") + (sexp :tag "Value")))) + "A type definition for customizing `nnshimbun-group-parameters'.") + +;; The following definition provides the group parameter +;; `nnshimbun-group-parameters', the user option +;; `nnshimbun-group-parameters-alist' and the function +;; `nnshimbun-find-group-parameters'. +;; +;; Note that the group parameter `nnshimbun-group-parameters' will +;; have a property list like the following: +;; +;; '(index-range all prefetch-articles t expiry-wait 6) +;; +;; So the third argument of the function `gnus-group-find-parameter' +;; should be non-nil to get the value of the group parameter. + +(gnus-define-group-parameter + nnshimbun-group-parameters + :function nnshimbun-find-group-parameters + :function-document "\ +Return a nnshimbun GROUP's group parameters." + :variable nnshimbun-group-parameters-alist + :variable-default nil + :variable-document "\ +Alist of nnshimbun group parameters. Each element should be a cons of +group name regexp and a plist which consists of a keyword and a value +pairs like the following: + +'(\"^nnshimbun\\\\+asahi:\" index-range all prefetch-articles t expiry-wait 6)" + :variable-group shimbun + :variable-type `(repeat (cons :format "%v" (regexp :tag "Group name regexp" + :value "^nnshimbun\\+") + ,nnshimbun-group-parameters-custom)) + :parameter-type nnshimbun-group-parameters-custom + :parameter-document "\ +Group parameters for the nnshimbun group. + +`Index range' specifies a range of header indices as described below: + all: Retrieve all header indices. + last: Retrieve the last header index. +integer N: Retrieve N pages of header indices. + +`Prefetch articles' specifies whether to pre-fetch the unread articles +when scanning the group. + +`Expire wait' is similar to the generic group parameter `expiry-wait', +but it has a preference.") + (defcustom nnshimbun-keep-unparsable-dated-articles t "*If non-nil, nnshimbun will never delete articles whose NOV date is unparsable." :group 'nnshimbun @@ -643,7 +717,7 @@ and the NOV is open. The optional fourth argument FORCE is ignored." (directory-files d))))) load-path))) (server (completing-read - "Shimbun address: " + "Shimbun address: " alist nil t (or (car nnshimbun-server-history) (caar alist))