+(require 'message)
+
+
+;; Customize variables
+(defgroup nnshimbun nil
+ "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)
+ (choice :tag "Prefetch articles"
+ :value off
+ (const on)
+ (const off)))
+ (list :inline t :format "%v"
+ (const :format "" encapsulate-images)
+ (choice :tag "Encapsulate article"
+ :value on
+ (const on)
+ (const 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 the 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'.
+;; The group parameter `nnshimbun-group-parameters' will have a
+;; property list like the following:
+;;
+;; '(index-range all prefetch-articles off encapsulate-images on
+;; expiry-wait 6)
+
+(unless (fboundp 'gnus-define-group-parameter)
+ (defmacro gnus-define-group-parameter (&rest args) nil)
+ (defun nnshimbun-find-group-parameters (name)
+ "Return a nnshimbun GROUP's group parameters."
+ (when name
+ (or (gnus-group-find-parameter name 'nnshimbun-group-parameters t)
+ (assoc-default name
+ (and (boundp 'nnshimbun-group-parameters-alist)
+ (symbol-value 'nnshimbun-group-parameters-alist))
+ (function string-match))))))
+
+(gnus-define-group-parameter
+ nnshimbun-group-parameters
+ :type list
+ :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
+a 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 off
+ encapsulate-images on expiry-wait 6)
+
+`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.
+
+`encapsulate-images' specifies whether inline images in the shimbun
+article are encapsulated.
+
+`expiry-wait' is similar to the generic group parameter `expiry-wait',
+but it has a preference."
+ :variable-group nnshimbun
+ :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.
+
+`Encapsulate article' specifies whether inline images in the shimbun
+article are encapsulated.
+
+`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
+ :type 'boolean)
+
+
+;; Define backend
+(gnus-declare-backend "nnshimbun" 'address)