diff lisp/vm/vm-digest.el @ 118:7d55a9ba150c r20-1b11

Import from CVS: tag r20-1b11
author cvs
date Mon, 13 Aug 2007 09:24:17 +0200
parents 360340f9fd5f
children b980b6286996
line wrap: on
line diff
--- a/lisp/vm/vm-digest.el	Mon Aug 13 09:23:08 2007 +0200
+++ b/lisp/vm/vm-digest.el	Mon Aug 13 09:24:17 2007 +0200
@@ -411,12 +411,7 @@
 			     folder-type
 			     after-prev-sep
 			     (match-beginning 0))
-			  (store-match-data md)))
-		      ;; eat preceding newlines
-		      (while (= (preceding-char) ?\n)
-			(delete-char -1))
-		      ;; put one back
-		      (insert ?\n)))
+			  (store-match-data md)))))
 	       ;; there should be at least one valid header at
 	       ;; the beginning of an encapsulated message.  If
 	       ;; there isn't a valid header, then assume that
@@ -432,12 +427,17 @@
 						    nil t))))))
 		   (setq prev-sep (point)
 			 after-prev-sep (point))
+		 ;; eat preceding newlines
+		 (while (= (preceding-char) ?\n)
+		   (delete-char -1))
+		 ;; put one back
+		 (insert ?\n)
+		 ;; delete the digest separator
 		 ;; insert a trailing message separator
-		 ;; delete the digest separator
 		 ;; insert the leading separator
 		 (if prev-sep
 		     (progn
-		       (delete-region (match-beginning 0) (match-end 0))
+		       (delete-region (match-beginning 0) (point))
 		       (insert (vm-trailing-message-separator folder-type))))
 		 (setq prev-sep (point))
 		 (insert (vm-leading-message-separator folder-type))