From: tsuchiya Date: Fri, 15 Jun 2001 10:51:32 +0000 (+0000) Subject: (nnshimbun-group-parameters-custom): Add X-Git-Tag: t-gnus-6_15_4-02-quimby-last-~28 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=01d758c7ac272499b954abb0074b814adfe54400;p=elisp%2Fgnus.git- (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. --- diff --git a/ChangeLog b/ChangeLog index a9e6f02..7265774 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +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. @@ -24,7 +37,7 @@ (nnshimbun-group-parameters-custom): New variable. (TopLevel): Require `gnus' expressly. -2001-06-12 TSUCHIYA Masatoshi +2001-06-12 TSUCHIYA Masatoshi * lisp/nnshimbun.el (nnshimbun-find-parameter): New macro. (nnshimbun-generate-nov-database): Use `nnshimbun-find-parameter'. @@ -48,7 +61,7 @@ inhibiting the expiring when `nnshimbun-keep-unparsable-dated-articles' is nil. -2001-06-11 TSUCHIYA Masatoshi +2001-06-11 TSUCHIYA Masatoshi * lisp/gnus-group.el (toplevel): Removed autoload code for "nnshimbun". @@ -66,7 +79,7 @@ * lisp/gnus.el: Autoload "nnshimbun" for the command `gnus-group- make-shimbun-group'. -2001-06-11 TSUCHIYA Masatoshi +2001-06-11 TSUCHIYA Masatoshi * lisp/nnshimbun.el: Remove some garbage. @@ -77,7 +90,7 @@ FSF Emacsen. * texi/gnus-ja.texi: Ditto. -2001-06-09 TSUCHIYA Masatoshi +2001-06-09 TSUCHIYA Masatoshi * lisp/nnshimbun.el (top-level): Updated comments. (nnshimbun): New customize group. @@ -93,7 +106,7 @@ (gnus-group-shimbun-server-history): Its definition is moved to `nnshimbun.el'. -2001-06-08 TSUCHIYA Masatoshi +2001-06-08 TSUCHIYA Masatoshi * lisp/nnshimbun.el (nnshimbun-use-entire-index): Removed. (nnshimbun-index-range): New variable. @@ -151,7 +164,7 @@ * lisp/gnus-clfns.el (find-cl-run-time-functions): Remove a useless non-global var; scroll the output window automatically. -2001-05-31 TSUCHIYA Masatoshi +2001-05-31 TSUCHIYA Masatoshi * lisp/nnshimbun.el (nnshimbun-header-xref): Removed. (nnshimbun-check-header): Removed. @@ -187,7 +200,7 @@ (cl-run-time-functions): New variable. (TopLevel): Don't require `cl' at run-time. -2001-05-28 TSUCHIYA Masatoshi +2001-05-28 TSUCHIYA Masatoshi * texi/gnus-ja.texi (Web Newspaper): Updated. @@ -203,7 +216,7 @@ * Mule23@1934.ja: Ditto. * Mule23@1934.en: Ditto. -2001-05-28 TSUCHIYA Masatoshi +2001-05-28 TSUCHIYA Masatoshi * lisp/nnshimbun.el: Reconstructed to use `shimbun'. diff --git a/lisp/nnshimbun.el b/lisp/nnshimbun.el index 27e7229..48e7e07 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-article) + (choice :tag "Encapsulate article" + :value on + (const on) + (const off))) (list :inline t :format "%v" (const :format "" expiry-wait) (choice :tag "Expire wait" @@ -136,6 +143,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 +173,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-article shimbun-encapsulate-article + "*If non-nil, inline images in the shimbun article are encapsulated. +Note that this variable has just a default value for all the nnshimbun +groups. You can specify the nnshimbun group parameter +`encapsulate-article' 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 +217,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-article (eval symbol)) + `(let ((v (or (plist-get (nnshimbun-find-group-parameters ,name) + 'encapsulate-article) + nnshimbun-encapsulate-article))) + (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 +361,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-article + (nnshimbun-find-parameter group 'encapsulate-article))) + (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 +550,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)