diff lisp/gnus/message.el @ 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 20662529a1ae
children 24202b793a08 ea2eb6e6874e
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 ()