changeset 77823:923182f9ab47

(message-narrow-to-headers-or-head): Ignore mail-header-separator in the body.
author Chong Yidong <cyd@stupidchicken.com>
date Mon, 28 May 2007 04:11:30 +0000
parents 1ee3640a5298
children 4596e2eaebc8
files lisp/gnus/message.el
diffstat 1 files changed, 6 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/gnus/message.el	Mon May 28 04:11:07 2007 +0000
+++ b/lisp/gnus/message.el	Mon May 28 04:11:30 2007 +0000
@@ -2225,14 +2225,12 @@
   (widen)
   (narrow-to-region
    (goto-char (point-min))
-   (cond
-    ((re-search-forward
-      (concat "^" (regexp-quote mail-header-separator) "\n") nil t)
-     (match-beginning 0))
-    ((search-forward "\n\n" nil t)
-     (1- (point)))
-    (t
-     (point-max))))
+   (if (re-search-forward (concat "\\(\n\\)\n\\|^\\("
+				  (regexp-quote mail-header-separator)
+				  "\n\\)")
+			  nil t)
+       (or (match-end 1) (match-beginning 2))
+     (point-max)))
   (goto-char (point-min)))
 
 (defun message-news-p ()