aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/mail/undigest.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/mail/undigest.el b/lisp/mail/undigest.el
index b80a5f4a48b..83ea58b3b63 100644
--- a/lisp/mail/undigest.el
+++ b/lisp/mail/undigest.el
@@ -55,10 +55,12 @@ Leaves original message, deleted, before the undigestified messages."
55 (point-max)) 55 (point-max))
56 (let* ((fill-prefix "") 56 (let* ((fill-prefix "")
57 (case-fold-search t) 57 (case-fold-search t)
58 start
58 (digest-name 59 (digest-name
59 (mail-strip-quoted-names 60 (mail-strip-quoted-names
60 (or (save-restriction 61 (or (save-restriction
61 (search-forward "\n\n") 62 (search-forward "\n\n")
63 (setq start (point))
62 (narrow-to-region (point-min) (point)) 64 (narrow-to-region (point-min) (point))
63 (goto-char (point-max)) 65 (goto-char (point-max))
64 (or (mail-fetch-field "Reply-To") 66 (or (mail-fetch-field "Reply-To")
@@ -69,11 +71,10 @@ Leaves original message, deleted, before the undigestified messages."
69 (save-excursion 71 (save-excursion
70 (goto-char (point-max)) 72 (goto-char (point-max))
71 (skip-chars-backward " \t\n") 73 (skip-chars-backward " \t\n")
72 (let ((count 10) found) 74 (let (found)
73 ;; compensate for broken un*x digestifiers. Sigh Sigh. 75 ;; compensate for broken un*x digestifiers. Sigh Sigh.
74 (while (and (> count 0) (not found)) 76 (while (and (> (point) start) (not found))
75 (forward-line -1) 77 (forward-line -1)
76 (setq count (1- count))
77 (if (looking-at (concat "End of.*Digest.*\n" 78 (if (looking-at (concat "End of.*Digest.*\n"
78 (regexp-quote "*********") "*" 79 (regexp-quote "*********") "*"
79 "\\(\n------*\\)*")) 80 "\\(\n------*\\)*"))