Importing Pterodactyl Gnus v0.97.
[elisp/gnus.git-] / lisp / qp.el
index 50fd046..18c66b7 100644 (file)
@@ -73,7 +73,7 @@ matched by that regexp."
   (save-excursion
     (save-restriction
       (narrow-to-region from to)
-      (mm-encode-body)
+;;      (mm-encode-body)
       ;; Encode all the non-ascii and control characters.
       (goto-char (point-min))
       (while (and (skip-chars-forward
@@ -95,13 +95,15 @@ matched by that regexp."
       (when fold
        ;; Fold long lines.
        (goto-char (point-min))
-       (end-of-line)
-       (while (> (current-column) 72)
-         (beginning-of-line)
-         (forward-char 72)
-         (search-backward "=" (- (point) 2) t)
-         (insert "=\n")
-         (end-of-line))))))
+       (while (not (eobp))
+         (end-of-line)
+         (while (> (current-column) 72)
+           (beginning-of-line)
+           (forward-char 72)
+           (search-backward "=" (- (point) 2) t)
+           (insert "=\n")
+           (end-of-line))
+         (forward-line))))))
 
 (defun quoted-printable-encode-string (string)
  "QP-encode STRING and return the results."