Synch to No Gnus 200512210722.
authoryamaoka <yamaoka>
Wed, 21 Dec 2005 07:23:02 +0000 (07:23 +0000)
committeryamaoka <yamaoka>
Wed, 21 Dec 2005 07:23:02 +0000 (07:23 +0000)
lisp/ChangeLog
lisp/nnrss.el

index 8331dd2..2a5a304 100644 (file)
@@ -1,3 +1,8 @@
+2005-12-21  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * nnrss.el (nnrss-request-article): Fix last change; fill
+       text/plain parts.
+
 2005-12-20  Katsumi Yamaoka  <yamaoka@jpl.org>
 
        * nnrss.el (nnrss-request-article): Replace <br />s with newlines
index f8ce3f8..73ce663 100644 (file)
@@ -250,8 +250,26 @@ The return value will be `html' or `text'."
                  (insert "</body></html>\n"))
              (mime-edit-insert-text "plain")
              (when text
-               ;; See `nnrss-check-group', which inserts <br />s.
-               (insert (gnus-replace-in-string text "<br />" "\n") "\n")
+               (goto-char (prog1
+                              (point)
+                            (insert text)))
+               ;; See `nnrss-check-group', which inserts "<br /><br />".
+               (if (search-forward "<br /><br />" nil t)
+                   (if (eobp)
+                       (replace-match "\n")
+                     (replace-match "\n\n")
+                     (let ((fill-column default-fill-column)
+                           (window (get-buffer-window nntp-server-buffer)))
+                       (when window
+                         (setq fill-column
+                               (max 1 (/ (* (window-width window) 7) 8))))
+                       (fill-region (point) (point-max))
+                       (goto-char (point-max))
+                       ;; XEmacs version of `fill-column' inserts newline.
+                       (unless (bolp)
+                         (insert "\n"))))
+                 (goto-char (point-max))
+                 (insert "\n"))
                (when (or link enclosure)
                  (insert "\n")))
              (when link