]> git.eshelyaron.com Git - emacs.git/commitdiff
(rmail-forward): Quote lines with `- ' when necessary.
authorRichard M. Stallman <rms@gnu.org>
Sun, 24 Dec 1995 18:44:34 +0000 (18:44 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sun, 24 Dec 1995 18:44:34 +0000 (18:44 +0000)
lisp/mail/rmail.el

index 91ad7d783ffb649f7c785d503e55b290b864180f..2e2880872df6a180739636cec376fa83d6701fc9 100644 (file)
@@ -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)