diff options
| author | Richard M. Stallman | 1998-04-18 01:54:05 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1998-04-18 01:54:05 +0000 |
| commit | b4b87b68dddfb8cb54804765bb5c1e577e14ad8e (patch) | |
| tree | 98c45523742c9a1375377bb5a826e246779834ca | |
| parent | 42de5a78791a48a0ae9c2f8e0d111f3c00a5d304 (diff) | |
| download | emacs-b4b87b68dddfb8cb54804765bb5c1e577e14ad8e.tar.gz emacs-b4b87b68dddfb8cb54804765bb5c1e577e14ad8e.zip | |
(rmail-message-regexp-p):
Handle unreformatted messages for real.
(rmail-message-recipients-p): Undo previous change.
| -rw-r--r-- | lisp/mail/rmail.el | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index 9c2f516c4e6..078d48b72f7 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el | |||
| @@ -2181,7 +2181,7 @@ or forward if N is negative." | |||
| 2181 | (defun rmail-message-recipients-p (msg recipients &optional primary-only) | 2181 | (defun rmail-message-recipients-p (msg recipients &optional primary-only) |
| 2182 | (save-restriction | 2182 | (save-restriction |
| 2183 | (goto-char (rmail-msgbeg msg)) | 2183 | (goto-char (rmail-msgbeg msg)) |
| 2184 | (search-forward "\n*** EOOH ***\n" (point-max) t) | 2184 | (search-forward "\n*** EOOH ***\n") |
| 2185 | (narrow-to-region (point) (progn (search-forward "\n\n") (point))) | 2185 | (narrow-to-region (point) (progn (search-forward "\n\n") (point))) |
| 2186 | (or (string-match recipients (or (mail-fetch-field "To") "")) | 2186 | (or (string-match recipients (or (mail-fetch-field "To") "")) |
| 2187 | (string-match recipients (or (mail-fetch-field "From") "")) | 2187 | (string-match recipients (or (mail-fetch-field "From") "")) |
| @@ -2190,13 +2190,20 @@ or forward if N is negative." | |||
| 2190 | 2190 | ||
| 2191 | (defun rmail-message-regexp-p (msg regexp) | 2191 | (defun rmail-message-regexp-p (msg regexp) |
| 2192 | "Return t, if for message number MSG, regexp REGEXP matches in the header." | 2192 | "Return t, if for message number MSG, regexp REGEXP matches in the header." |
| 2193 | (goto-char (rmail-msgbeg msg)) | 2193 | (save-excursion |
| 2194 | (let ((end | 2194 | (goto-char (rmail-msgbeg msg)) |
| 2195 | (save-excursion | 2195 | (let (beg end) |
| 2196 | (or (search-forward "\n*** EOOH ***\n" (point-max) t) | 2196 | (save-excursion |
| 2197 | (search-forward "\n\n" (point-max))) | 2197 | (forward-line 2) |
| 2198 | (point)))) | 2198 | (setq beg (point))) |
| 2199 | (re-search-forward regexp end t))) | 2199 | (save-excursion |
| 2200 | (search-forward "\n*** EOOH ***\n" (point-max)) | ||
| 2201 | (when (= beg (match-beginning 0)) | ||
| 2202 | (setq beg (point)) | ||
| 2203 | (search-forward "\n\n" (point-max))) | ||
| 2204 | (setq end (point))) | ||
| 2205 | (goto-char beg) | ||
| 2206 | (re-search-forward regexp end t)))) | ||
| 2200 | 2207 | ||
| 2201 | (defvar rmail-search-last-regexp nil) | 2208 | (defvar rmail-search-last-regexp nil) |
| 2202 | (defun rmail-search (regexp &optional n) | 2209 | (defun rmail-search (regexp &optional n) |