From c8a428c4e3422ba0a36e54eabf9f0185c9d771b1 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 24 Dec 1995 18:44:34 +0000 Subject: [PATCH] (rmail-forward): Quote lines with `- ' when necessary. --- lisp/mail/rmail.el | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index 91ad7d783ff..2e2880872df 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el @@ -2251,7 +2251,15 @@ see the documentation of `rmail-resend'." (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) -- 2.39.2