Source

vm / vm-digest.el

Diff from to

File vm-digest.el

 		  (setq start (point))
 		  (vm-mime-insert-mime-body layout)
 		  (vm-munge-message-separators folder-type start (point))
+		  ;; remove any leading newlines as they will
+		  ;; make vm-reorder-message-headers think the
+		  ;; header section has ended.
+		  (save-excursion
+		    (goto-char start)
+		    (while (= (following-char) ?\n)
+		      (delete-char 1)))
 		  (insert (vm-trailing-message-separator folder-type)))
 		 ((vm-mime-types-match "multipart/digest"
 				       (car (vm-mm-layout-type layout)))
 		    (setq start (point))
 		    (vm-mime-insert-mime-body (car part-list))
 		    (vm-munge-message-separators folder-type start (point))
+		    ;; remove any leading newlines as they will
+		    ;; make vm-reorder-message-headers think the
+		    ;; header section has ended.
+		    (save-excursion
+		      (goto-char start)
+		      (while (= (following-char) ?\n)
+			(delete-char 1)))
 		    (insert (vm-trailing-message-separator folder-type))
 		    (setq part-list (cdr part-list))))
 		 (t (error
 		      (save-match-data
 			;; People who roll digests often think
 			;; any old format will do.  Adding blank
-			;; lines after teh message separator is
-			;; common.  Spaces on such lines are an
+			;; lines after the message separator is
+			;; common.  Spaces in such lines are an
 			;; added delight.
 			(skip-chars-forward " \n")
 			(or (and (vm-match-header)