aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Moellmann2001-04-26 13:43:42 +0000
committerGerd Moellmann2001-04-26 13:43:42 +0000
commit7cff9c6f87651a977e752b781a28d9dc459da84a (patch)
treefa27ef67e944b9b4c488be74cc7e16bac6d8bceb
parentba973f7a65e914038247e69c6149d75042215b71 (diff)
downloademacs-7cff9c6f87651a977e752b781a28d9dc459da84a.tar.gz
emacs-7cff9c6f87651a977e752b781a28d9dc459da84a.zip
(rmail-message-regexp-p): Use rfc822-goto-eoh
if necessary, like in rmail-show-message.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/mail/rmail.el36
2 files changed, 25 insertions, 16 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 06b679a80b4..3d42dccf890 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12001-04-26 Gerd Moellmann <gerd@gnu.org>
2
3 * mail/rmail.el (rmail-message-regexp-p): Use rfc822-goto-eoh
4 if necessary, like in rmail-show-message.
5
12001-04-26 Vinicius Jose Latorre <vinicius@cpqd.com.br> 62001-04-26 Vinicius Jose Latorre <vinicius@cpqd.com.br>
2 7
3 * ps-print.el: Color specified by number is forced to be float number. 8 * ps-print.el: Color specified by number is forced to be float number.
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el
index 927ac482bba..8ff2800cda6 100644
--- a/lisp/mail/rmail.el
+++ b/lisp/mail/rmail.el
@@ -2495,22 +2495,26 @@ or forward if N is negative."
2495 (if (not primary-only) 2495 (if (not primary-only)
2496 (string-match recipients (or (mail-fetch-field "Cc") "")))))) 2496 (string-match recipients (or (mail-fetch-field "Cc") ""))))))
2497 2497
2498(defun rmail-message-regexp-p (msg regexp) 2498(defun rmail-message-regexp-p (n regexp)
2499 "Return t, if for message number MSG, regexp REGEXP matches in the header." 2499 "Return t, if for message number N, regexp REGEXP matches in the header."
2500 (save-excursion 2500 (let ((beg (rmail-msgbeg n))
2501 (goto-char (rmail-msgbeg msg)) 2501 (end (rmail-msgend n)))
2502 (let (beg end) 2502 (goto-char beg)
2503 (save-excursion 2503 (forward-line 1)
2504 (forward-line 2) 2504 (save-excursion
2505 (setq beg (point))) 2505 (save-restriction
2506 (save-excursion 2506 (if (prog1 (= (following-char) ?0)
2507 (search-forward "\n*** EOOH ***\n" (point-max)) 2507 (forward-line 2)
2508 (when (= beg (match-beginning 0)) 2508 ;; If there's a Summary-line in the (otherwise empty)
2509 (setq beg (point)) 2509 ;; header, we didn't yet get past the EOOH line.
2510 (search-forward "\n\n" (point-max))) 2510 (if (looking-at "^\\*\\*\\* EOOH \\*\\*\\*\n")
2511 (setq end (point))) 2511 (forward-line 1))
2512 (goto-char beg) 2512 (narrow-to-region (point) end))
2513 (re-search-forward regexp end t)))) 2513 (rfc822-goto-eoh)
2514 (search-forward "\n*** EOOH ***\n" end t))
2515 (narrow-to-region beg (point))
2516 (goto-char (point-min))
2517 (re-search-forward regexp end t)))))
2514 2518
2515(defvar rmail-search-last-regexp nil) 2519(defvar rmail-search-last-regexp nil)
2516(defun rmail-search (regexp &optional n) 2520(defun rmail-search (regexp &optional n)