]> git.eshelyaron.com Git - emacs.git/commitdiff
(undigestify-rmail-message): Scan back as far as start
authorRichard M. Stallman <rms@gnu.org>
Mon, 25 Sep 1995 18:40:24 +0000 (18:40 +0000)
committerRichard M. Stallman <rms@gnu.org>
Mon, 25 Sep 1995 18:40:24 +0000 (18:40 +0000)
of message, to find end of digest.

lisp/mail/undigest.el

index b80a5f4a48b5ad22d6dda9be92feaa60f2dc5bed..83ea58b3b63cd7184a47ce09e0c18856b0b16ea4 100644 (file)
@@ -55,10 +55,12 @@ Leaves original message, deleted, before the undigestified messages."
                              (point-max))
            (let* ((fill-prefix "")
                   (case-fold-search t)
+                  start
                   (digest-name
                    (mail-strip-quoted-names
                     (or (save-restriction
                           (search-forward "\n\n")
+                          (setq start (point))
                           (narrow-to-region (point-min) (point))
                           (goto-char (point-max))
                           (or (mail-fetch-field "Reply-To")
@@ -69,11 +71,10 @@ Leaves original message, deleted, before the undigestified messages."
              (save-excursion
                (goto-char (point-max))
                (skip-chars-backward " \t\n")
-               (let ((count 10) found)
+               (let (found)
                  ;; compensate for broken un*x digestifiers.  Sigh Sigh.
-                 (while (and (> count 0) (not found))
+                 (while (and (> (point) start) (not found))
                    (forward-line -1)
-                   (setq count (1- count))
                    (if (looking-at (concat "End of.*Digest.*\n"
                                            (regexp-quote "*********") "*"
                                            "\\(\n------*\\)*"))