changeset 11498:da7bbadf9999

(undigestify-rmail-message): Strip "^- " which is added by some digest makers to the beginning of lines.
author Richard M. Stallman <rms@gnu.org>
date Thu, 20 Apr 1995 02:31:16 +0000
parents c98433c64db1
children 24ae4a1359b8
files lisp/mail/undigest.el
diffstat 1 files changed, 15 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mail/undigest.el	Thu Apr 20 02:23:28 1995 +0000
+++ b/lisp/mail/undigest.el	Thu Apr 20 02:31:16 1995 +0000
@@ -99,9 +99,22 @@
 				      (progn (search-forward "\n\n"
 							     nil 'move)
 					     (point))))
-		  (if (mail-fetch-field "To") nil
+		  (if (mail-fetch-field "To")
+		      nil
 		    (goto-char (point-min))
-		    (insert "To: " digest-name "\n"))))))
+		    (insert "To: " digest-name "\n")))
+		;; Digestifiers may insert `- ' on lines that start with `-'.
+		;; Undo that.
+		(save-excursion
+		  (goto-char (point-min))
+		  (if (re-search-forward
+		       "\n\n----------------------------*\n*"
+		       nil t)
+		      (let ((end (point-marker)))
+			(goto-char (point-min))
+			(while (re-search-forward "^- " end t)
+			  (delete-char -2)))))
+		)))
 	  (setq error nil)
 	  (message "Message successfully undigestified")
 	  (let ((n rmail-current-message))