From: Richard M. Stallman Date: Sun, 24 Dec 1995 18:44:34 +0000 (+0000) Subject: (rmail-forward): Quote lines with `- ' when necessary. X-Git-Tag: emacs-19.34~2026 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c8a428c4e3422ba0a36e54eabf9f0185c9d771b1;p=emacs.git (rmail-forward): Quote lines with `- ' when necessary. --- 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)