diff options
author | Chong Yidong <cyd@stupidchicken.com> | 2007-05-28 04:11:30 +0000 |
---|---|---|
committer | Chong Yidong <cyd@stupidchicken.com> | 2007-05-28 04:11:30 +0000 |
commit | d05b3cfd6197df2ddcd71345db04bf926a5f62fd (patch) | |
tree | 18072adf3051c6de5a7bc945419f4d491ee76eed /lisp | |
parent | 3938661c207036c57c38ea9bb2c0f24460eb2210 (diff) | |
download | emacs-d05b3cfd6197df2ddcd71345db04bf926a5f62fd.tar.gz |
(message-narrow-to-headers-or-head): Ignore mail-header-separator in
the body.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/gnus/message.el | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 1ef0fa7757d..eef854f4fb7 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -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 () |