changeset 13834:3c51aa417e32

(rmail-forward): Quote lines with `- ' when necessary.
author Richard M. Stallman <rms@gnu.org>
date Sun, 24 Dec 1995 18:44:34 +0000
parents 467bc73e8734
children fc6b59f8a580
files lisp/mail/rmail.el
diffstat 1 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mail/rmail.el	Sun Dec 24 16:03:05 1995 +0000
+++ b/lisp/mail/rmail.el	Sun Dec 24 18:44:34 1995 +0000
@@ -2251,7 +2251,15 @@
 	     (concat "^" (regexp-quote mail-header-separator) "$"))
 	    (forward-line 1)
 	    (insert "------- Start of forwarded message -------\n")
-	    (insert-buffer-substring forward-buffer)
+	    ;; Quote lines with `- ' if they start with `-'.
+	    (let ((beg (point)) end)
+	      (insert-buffer-substring forward-buffer)
+	      (goto-char beg)
+	      (while (re-search-forward "^-" nil t)
+		(beginning-of-line)
+		(insert "- ")
+		(forward-line 1))
+	      (goto-char (point-max)))
 	    (let ((end (point)))
 	      (skip-chars-backward "\n")
 	      (if (< (point) end)