diff lisp/mail/rmail.el @ 4673:047e8f8469d9

(rmail-convert-file): Exclude the Babyl header when calling rmail-convert-to-babyl-format.
author Richard M. Stallman <rms@gnu.org>
date Tue, 07 Sep 1993 10:41:05 +0000
parents 131a3edbd49f
children 196fac1c1086
line wrap: on
line diff
--- a/lisp/mail/rmail.el	Tue Sep 07 08:36:48 1993 +0000
+++ b/lisp/mail/rmail.el	Tue Sep 07 10:41:05 1993 +0000
@@ -276,14 +276,19 @@
     ;; Unix format messages added at the end,
     ;; convert file as necessary.
     (if (or convert
-	    (progn (goto-char (point-max))
-		   (search-backward "\^_")
-		   (forward-char 1)
-		   (looking-at "\n*From ")))
+	    (save-excursion
+	      (goto-char (point-max))
+	      (search-backward "\^_")
+	      (forward-char 1)
+	      (looking-at "\n*From ")))
 	(let ((buffer-read-only nil))
 	  (message "Converting to Babyl format...")
-;;; If file needs conversion, convert it all.
+	  ;; If file needs conversion, convert it all,
+	  ;; except for the BABYL header.
+	  ;; (rmail-convert-to-babyl-format would delete the header.)
 ;;;	  (narrow-to-region (point) (point-max))
+	  (goto-char (point-min))
+	  (search-forward "\n\^_" nil t)
 	  (rmail-convert-to-babyl-format)
 	  (message "Converting to Babyl format...done")))))