]> git.eshelyaron.com Git - emacs.git/commitdiff
(rmail-retry-failure): Handle a weird case with
authorRichard M. Stallman <rms@gnu.org>
Sun, 31 Jul 1994 20:08:53 +0000 (20:08 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sun, 31 Jul 1994 20:08:53 +0000 (20:08 +0000)
a couple of lines before the old message header.

lisp/mail/rmail.el

index 93d8fc3ac5a3789f76be333eabb164646a413885..1d3246e5e1f21241614c8d575f54d36139bf79b0 100644 (file)
@@ -2098,6 +2098,14 @@ the body of the original message."
        (or (re-search-forward mail-unsent-separator nil t)
            (error "Cannot parse this as a failure message")))
       (save-restriction
+       ;; One message contained a few random lines before the old
+       ;; message header.  The first line of the message started with
+       ;; two hyphens.  A blank line follows these random lines.
+       (skip-chars-forward "\n")
+       (if (looking-at "^--")
+           (progn
+             (search-forward "\n\n")
+             (skip-chars-forward "\n")))
        (narrow-to-region (point) (point-max))
        ;; Now mail-fetch-field will get from headers of the original message,
        ;; not from the headers of the rejection.