]> git.eshelyaron.com Git - emacs.git/commitdiff
(message-narrow-to-headers-or-head): Ignore mail-header-separator in
authorChong Yidong <cyd@stupidchicken.com>
Mon, 28 May 2007 04:11:30 +0000 (04:11 +0000)
committerChong Yidong <cyd@stupidchicken.com>
Mon, 28 May 2007 04:11:30 +0000 (04:11 +0000)
the body.

lisp/gnus/message.el

index 1ef0fa7757db86f76a3065f6ffd65de9092ccc43..eef854f4fb7bd86366f99ceaaf9f21ddf46ad738 100644 (file)
@@ -2225,14 +2225,12 @@ Point is left at the beginning of the narrowed-to region."
   (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 ()