From: yamaoka Date: Mon, 18 Jun 2001 01:55:18 +0000 (+0000) Subject: Synchronize with the branch `t-gnus-6_15-quimby'. X-Git-Tag: t-gnus-6_15_3-03~20 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=923b3fda46e20626a80df0853214e3d6db81d313;p=elisp%2Fgnus.git- Synchronize with the branch `t-gnus-6_15-quimby'. --- diff --git a/ChangeLog b/ChangeLog index c014447..f228164 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,26 @@ +2001-06-18 Katsumi Yamaoka + + * lisp/nnshimbun.el (nnshimbun-encapsulate-images): Renamed from + `nnshimbun-encapsulate-article'. + (nnshimbun-request-article-1): Replace `encapsulate-article' with + `encapsulate-images'. + (nnshimbun-find-parameter): Ditto. + (nnshimbun-group-parameters): Ditto. + (nnshimbun-group-parameters-custom): Ditto. + +2001-06-15 TSUCHIYA Masatoshi + + * lisp/nnshimbun.el (nnshimbun-group-parameters-custom): Add + `encapsulate-article' as a customizable option, and modified + `prefetch-articles'. + (nnshimbun-group-parameters): Add document for + `encapsulate-article'. + (nnshimbun-encapsulate-article): New server variable. + (nnshimbun-find-parameter): Add code for `encapsulate-article'. + (nnshimbun-request-article-1): Refer `encapsulate-article' group + parameter to control `shimbun-encapsulate-article' value when + `shimbun-article' is called. + 2001-06-14 Katsumi Yamaoka * lisp/gnus-vers.el (gnus-revision-number): Increment to 02. diff --git a/lisp/nnshimbun.el b/lisp/nnshimbun.el index 27e7229..503f1f7 100644 --- a/lisp/nnshimbun.el +++ b/lisp/nnshimbun.el @@ -70,9 +70,16 @@ (integer :tag "days"))) (list :inline t :format "%v" (const :format "" prefetch-articles) - (boolean :tag "Prefetch articles" - :on "on" - :off "off")) + (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" @@ -93,7 +100,8 @@ ;; The group parameter `nnshimbun-group-parameters' will have a ;; property list like the following: ;; -;; '(index-range all prefetch-articles t expiry-wait 6) +;; '(index-range all prefetch-articles off encapsulate-images on +;; expiry-wait 6) (gnus-define-group-parameter nnshimbun-group-parameters @@ -108,7 +116,8 @@ 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 t expiry-wait 6) +'(\"^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. @@ -118,6 +127,9 @@ 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 @@ -136,6 +148,9 @@ 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.") @@ -163,6 +178,12 @@ groups. Note that this variable has just a default value for all the nnshimbun groups. You can specify the nnshimbun group parameter `prefecth-articles' for each nnshimbun group.") +(defvoo nnshimbun-encapsulate-images shimbun-encapsulate-images + "*If non-nil, inline images will be encapsulated in the articles. +Note that this variable has just a default value for all the nnshimbun +groups. You can specify the nnshimbun group parameter +`encapsulate-images' for each nnshimbun group.") + (defvoo nnshimbun-index-range nil "*Range of indices to detect new pages. Note that this variable has just a default value for all the nnshimbun groups. You can specify @@ -201,6 +222,42 @@ the nnshimbun group parameter `index-range' for each nnshimbun group.") (put 'nnshimbun-backlog 'edebug-form-spec '(form body)) +;;; Group parameter +(defmacro nnshimbun-find-parameter (group symbol &optional full-name-p) + "Return the value of a nnshimbun group parameter for GROUP which is +associated with SYMBOL. If FULL-NAME-P is non-nil, it treats that +GROUP has a full name." + (let ((name (if full-name-p + group + `(concat "nnshimbun+" (nnoo-current-server 'nnshimbun) + ":" ,group)))) + (cond ((eq 'index-range (eval symbol)) + `(or (plist-get (nnshimbun-find-group-parameters ,name) + 'index-range) + nnshimbun-index-range)) + ((eq 'prefetch-articles (eval symbol)) + `(let ((v (or (plist-get (nnshimbun-find-group-parameters ,name) + 'prefetch-articles) + nnshimbun-pre-fetch-article))) + (if (eq v 'off) nil v))) + ((eq 'encapsulate-images (eval symbol)) + `(let ((v (or (plist-get (nnshimbun-find-group-parameters ,name) + 'encapsulate-images) + nnshimbun-encapsulate-images))) + (if (eq v 'off) nil v))) + ((eq 'expiry-wait (eval symbol)) + (if full-name-p + `(or (plist-get (nnshimbun-find-group-parameters ,group) + 'expiry-wait) + (gnus-group-find-parameter ,group 'expiry-wait)) + `(let ((name ,name)) + (or (plist-get (nnshimbun-find-group-parameters name) + 'expiry-wait) + (gnus-group-find-parameter name 'expiry-wait))))) + (t + `(plist-get (nnshimbun-find-group-parameters ,name) ,symbol))))) + + ;;; Interface Functions (nnoo-define-basics nnshimbun) @@ -309,7 +366,9 @@ the nnshimbun group parameter `index-range' for each nnshimbun group.") (when header (with-current-buffer (or to-buffer nntp-server-buffer) (delete-region (point-min) (point-max)) - (shimbun-article nnshimbun-shimbun header) + (let ((shimbun-encapsulate-images + (nnshimbun-find-parameter group 'encapsulate-images))) + (shimbun-article nnshimbun-shimbun header)) (when (> (buffer-size) 0) ;; Kludge! replace a date string in `gnus-newsgroup-data' ;; based on the newly retrieved article. @@ -496,34 +555,6 @@ also be nil." (insert " ")) (forward-line 1))) -(defmacro nnshimbun-find-parameter (group symbol &optional full-name-p) - "Return the value of a nnshimbun group parameter for GROUP which is -associated with SYMBOL. If FULL-NAME-P is non-nil, it treats that -GROUP has a full name." - (let ((name (if full-name-p - group - `(concat "nnshimbun+" (nnoo-current-server 'nnshimbun) - ":" ,group)))) - (cond ((eq 'index-range (eval symbol)) - `(or (plist-get (nnshimbun-find-group-parameters ,name) - 'index-range) - nnshimbun-index-range)) - ((eq 'prefetch-articles (eval symbol)) - `(or (plist-get (nnshimbun-find-group-parameters ,name) - 'prefetch-articles) - nnshimbun-pre-fetch-article)) - ((eq 'expiry-wait (eval symbol)) - (if full-name-p - `(or (plist-get (nnshimbun-find-group-parameters ,group) - 'expiry-wait) - (gnus-group-find-parameter ,group 'expiry-wait)) - `(let ((name ,name)) - (or (plist-get (nnshimbun-find-group-parameters name) - 'expiry-wait) - (gnus-group-find-parameter name 'expiry-wait))))) - (t - `(plist-get (nnshimbun-find-group-parameters ,name) ,symbol))))) - (defun nnshimbun-generate-nov-database (group) (nnshimbun-possibly-change-group group) (with-current-buffer (nnshimbun-open-nov group) diff --git a/texi/gnus-ja.texi b/texi/gnus-ja.texi index f50f7cb..1120956 100644 --- a/texi/gnus-ja.texi +++ b/texi/gnus-ja.texi @@ -12700,7 +12700,21 @@ an_egroup RET egroups RET www.egroups.comRET your@@email.address RET}。 数 @code{nnshimbun-pre-fetch-article} が @code{nil} 以外の値にセットされ ていたならば、グループパラメータ @code{prefetch-articles} が設定されてい ないか、その値が @code{nil} になっているグループでも、前もって記事のダウ -ンロードを行ないます。 +ンロードを行ないます。変数 @code{nnshimbun-pre-fetch-article} のディフォ +ルト値は @code{nil} です。 + +@item encapsulate-images +@vindex nnshimbun-encapsulate-images +このグループパラメータが @code{nil} 以外の値にセットされているグループで +は、@code{nnshimbun} は元に記事に埋め込まれている画像データ +を @samp{multipart/related} の形式で記事にはめ込みます。もし、変 +数 @code{nnshimbun-encapsulate-images} が @code{nil} 以外の値にセットさ +れていたならば、グループパラメータ @code{encapsulate-images} が設定され +ていないか、その値が @code{nil} になっているグループでも、画像データを +@samp{multipart/related} の形式で記事にはめ込みます。変 +数 @code{nnshimbun-encapsulate-images} のディフォルト値 +は、@code{shimbun} ライブラリの変数 @code{shimbun-encapsulate-images} の +値です (たぶんそのディフォルト値は @code{t} です)。 @item index-range @vindex nnshimbun-index-range @@ -12731,13 +12745,14 @@ an_egroup RET egroups RET www.egroups.comRET your@@email.address RET}。 グループパラメータ @code{index-range} が設定されていないか、値 が @code{nil} になっているグループでは、変 数 @code{nnshimbun-index-range} の値がディフォルトとして使われます。 +なお、@code{nnshimbun-index-range} のディフォルト値は @code{nil} です。 @item nnshimbun-group-parameters-alist @vindex nnshimbun-group-parameters-alist @code{nnshimbun-group-parameters-alist} はカスタマイズ可能なユーザオプショ ンで、各要素にグループ名の正規表現と @code{nnshimbun} 専用のグループパラ メータと同じプロパティリストを持つことができる連想リストです。連想リスト -の各要素は次のような値を持ちます。 +の各要素は次のような値を持ちます。初期値は @code{nil} です。 @lisp '("^nnshimbun\\+asahi:"