comparison lisp/mail/undigest.el @ 13080:21a1494b450c

(undigestify-rmail-message): Scan back as far as start of message, to find end of digest.
author Richard M. Stallman <rms@gnu.org>
date Mon, 25 Sep 1995 18:40:24 +0000 (1995-09-25)
parents da7bbadf9999
children d383abe2f9f3
comparison
equal deleted inserted replaced
13079:6a91723f2a8c 13080:21a1494b450c
53 (insert "\^_\^L\n0, unseen,,\n*** EOOH ***\n") 53 (insert "\^_\^L\n0, unseen,,\n*** EOOH ***\n")
54 (narrow-to-region (point) 54 (narrow-to-region (point)
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")
65 (mail-fetch-field "To") 67 (mail-fetch-field "To")
66 (mail-fetch-field "Apparently-To") 68 (mail-fetch-field "Apparently-To")
67 (mail-fetch-field "From"))) 69 (mail-fetch-field "From")))
68 (error "Message is not a digest"))))) 70 (error "Message is not a digest")))))
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------*\\)*"))
80 (setq found t))) 81 (setq found t)))
81 (if (not found) (error "Message is not a digest")))) 82 (if (not found) (error "Message is not a digest"))))