Synchronize with the branch `t-gnus-6_15-quimby'.
authoryamaoka <yamaoka>
Mon, 18 Jun 2001 01:55:18 +0000 (01:55 +0000)
committeryamaoka <yamaoka>
Mon, 18 Jun 2001 01:55:18 +0000 (01:55 +0000)
ChangeLog
lisp/nnshimbun.el
texi/gnus-ja.texi

index c014447..f228164 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,26 @@
+2001-06-18  Katsumi Yamaoka <yamaoka@jpl.org>
+
+       * 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  <tsuchiya@namazu.org>
+
+       * 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 <yamaoka@jpl.org>
 
        * lisp/gnus-vers.el (gnus-revision-number): Increment to 02.
index 27e7229..503f1f7 100644 (file)
                                  (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"
 ;; 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)
index f50f7cb..1120956 100644 (file)
@@ -12700,7 +12700,21 @@ an_egroup RET egroups RET www.egroups.comRET your@@email.address RET}\e$B!#\e(B
 \e$B?t\e(B @code{nnshimbun-pre-fetch-article} \e$B$,\e(B @code{nil} \e$B0J30$NCM$K%;%C%H$5$l\e(B
 \e$B$F$$$?$J$i$P!"%0%k!<%W%Q%i%a!<%?\e(B @code{prefetch-articles} \e$B$,@_Dj$5$l$F$$\e(B
 \e$B$J$$$+!"$=$NCM$,\e(B @code{nil} \e$B$K$J$C$F$$$k%0%k!<%W$G$b!"A0$b$C$F5-;v$N%@%&\e(B
-\e$B%s%m!<%I$r9T$J$$$^$9!#\e(B
+\e$B%s%m!<%I$r9T$J$$$^$9!#JQ?t\e(B @code{nnshimbun-pre-fetch-article} \e$B$N%G%#%U%)\e(B
+\e$B%k%HCM$O\e(B @code{nil} \e$B$G$9!#\e(B
+
+@item encapsulate-images
+@vindex nnshimbun-encapsulate-images
+\e$B$3$N%0%k!<%W%Q%i%a!<%?$,\e(B @code{nil} \e$B0J30$NCM$K%;%C%H$5$l$F$$$k%0%k!<%W$G\e(B
+\e$B$O!"\e(B@code{nnshimbun} \e$B$O85$K5-;v$KKd$a9~$^$l$F$$$k2hA|%G!<%?\e(B
+\e$B$r\e(B @samp{multipart/related} \e$B$N7A<0$G5-;v$K$O$a9~$_$^$9!#$b$7!"JQ\e(B
+\e$B?t\e(B @code{nnshimbun-encapsulate-images} \e$B$,\e(B @code{nil} \e$B0J30$NCM$K%;%C%H$5\e(B
+\e$B$l$F$$$?$J$i$P!"%0%k!<%W%Q%i%a!<%?\e(B @code{encapsulate-images} \e$B$,@_Dj$5$l\e(B
+\e$B$F$$$J$$$+!"$=$NCM$,\e(B @code{nil} \e$B$K$J$C$F$$$k%0%k!<%W$G$b!"2hA|%G!<%?$r\e(B
+@samp{multipart/related} \e$B$N7A<0$G5-;v$K$O$a9~$_$^$9!#JQ\e(B
+\e$B?t\e(B @code{nnshimbun-encapsulate-images} \e$B$N%G%#%U%)%k%HCM\e(B
+\e$B$O!"\e(B@code{shimbun} \e$B%i%$%V%i%j$NJQ?t\e(B @code{shimbun-encapsulate-images} \e$B$N\e(B
+\e$BCM$G$9\e(B (\e$B$?$V$s$=$N%G%#%U%)%k%HCM$O\e(B @code{t} \e$B$G$9\e(B)\e$B!#\e(B
 
 @item index-range
 @vindex nnshimbun-index-range
@@ -12731,13 +12745,14 @@ an_egroup RET egroups RET www.egroups.comRET your@@email.address RET}\e$B!#\e(B
 \e$B%0%k!<%W%Q%i%a!<%?\e(B @code{index-range} \e$B$,@_Dj$5$l$F$$$J$$$+!"CM\e(B
 \e$B$,\e(B @code{nil} \e$B$K$J$C$F$$$k%0%k!<%W$G$O!"JQ\e(B
 \e$B?t\e(B @code{nnshimbun-index-range} \e$B$NCM$,%G%#%U%)%k%H$H$7$F;H$o$l$^$9!#\e(B
+\e$B$J$*!"\e(B@code{nnshimbun-index-range} \e$B$N%G%#%U%)%k%HCM$O\e(B @code{nil} \e$B$G$9!#\e(B
 
 @item nnshimbun-group-parameters-alist
 @vindex nnshimbun-group-parameters-alist
 @code{nnshimbun-group-parameters-alist} \e$B$O%+%9%?%^%$%:2DG=$J%f!<%6%*%W%7%g\e(B
 \e$B%s$G!"3FMWAG$K%0%k!<%WL>$N@55,I=8=$H\e(B @code{nnshimbun} \e$B@lMQ$N%0%k!<%W%Q%i\e(B
 \e$B%a!<%?$HF1$8%W%m%Q%F%#%j%9%H$r;}$D$3$H$,$G$-$kO"A[%j%9%H$G$9!#O"A[%j%9%H\e(B
-\e$B$N3FMWAG$O<!$N$h$&$JCM$r;}$A$^$9!#\e(B
+\e$B$N3FMWAG$O<!$N$h$&$JCM$r;}$A$^$9!#=i4|CM$O\e(B @code{nil} \e$B$G$9!#\e(B
 
 @lisp
 '("^nnshimbun\\+asahi:"