(message-check-news-header-syntax): Compute the
[gnus] / lisp / gnus-fun.el
index 08b60e6..aa711da 100644 (file)
@@ -85,6 +85,7 @@ Output to the current buffer, replace text, and don't mingle error."
   (when (file-exists-p file)
     (let ((done nil)
          (attempt "")
+         (step 72)
          (quant 16))
       (while (and (not done)
                  (> quant 1))
@@ -104,10 +105,14 @@ Output to the current buffer, replace text, and don't mingle error."
            (insert attempt)
            (base64-encode-region (point-min) (point-max))
            (goto-char (point-min))
-           (forward-line 1)
-           (while (not (eobp))
-             (insert " ")
-             (forward-line 1))
+           (while (search-forward "\n" nil t)
+             (replace-match ""))
+           (goto-char (point-min))
+           (while (> (- (point-max) (point))
+                     step)
+             (forward-char step)
+             (insert "\n ")
+             (setq step 76))
            (buffer-string))
        nil))))