Importing Gnus v5.8.6.
[elisp/gnus.git-] / lisp / mm-bodies.el
index 3a545d3..8c42436 100644 (file)
@@ -60,7 +60,7 @@ If successful, the MIME charset is returned.
 If no encoding was done, nil is returned."
   (if (not (featurep 'mule))
       ;; In the non-Mule case, we search for non-ASCII chars and
-      ;; return the value of `mm-default-charset' if any are found.
+      ;; return the value of `mail-parse-charset' if any are found.
       (save-excursion
        (goto-char (point-min))
        (if (re-search-forward "[^\x0-\x7f]" nil t)
@@ -168,12 +168,9 @@ If no encoding was done, nil is returned."
             ;; have been added by mailing list software.
             (save-excursion
               (goto-char (point-min))
-              (if (re-search-forward "^[\t ]*$" nil t)
-                  (delete-region (point) (point-max))
-                (goto-char (point-max)))
-              (skip-chars-backward "\n\t ")
-              (delete-region (point) (point-max))
-              (point))))
+              (while (re-search-forward "^[\t ]*\r?\n" nil t)
+                (delete-region (match-beginning 0) (match-end 0)))
+              (point-max))))
           ((memq encoding '(7bit 8bit binary))
            ;; Do nothing.
            )