From: yamaoka Date: Tue, 8 Jan 2002 06:49:03 +0000 (+0000) Subject: * nnheader.el (mail-narrow-to-head): Copy from ietf-drums.el; X-Git-Tag: t-gnus-6_15_4-11~9 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=3d389e7ba91cf1fbc486362cd4d5977e89ea915a;p=elisp%2Fgnus.git- * nnheader.el (mail-narrow-to-head): Copy from ietf-drums.el; it should go to the beginning of the header after narrowing. --- diff --git a/ChangeLog b/ChangeLog index 85c9dc8..f8e3b4c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,8 @@ 2002-01-08 Katsumi Yamaoka - * lisp/nnheader.el (std11-extract-addresses-components): Protect - against nil argument. + * lisp/nnheader.el (mail-narrow-to-head): Copy from ietf-drums.el; + it should go to the beginning of the header after narrowing. + (std11-extract-addresses-components): Protect against nil argument. 2002-01-08 Katsumi Yamaoka diff --git a/lisp/nnheader.el b/lisp/nnheader.el index c97891b..16d5469 100644 --- a/lisp/nnheader.el +++ b/lisp/nnheader.el @@ -1223,7 +1223,14 @@ find-file-hooks, etc. (defalias 'mail-header-narrow-to-field 'std11-narrow-to-field) - (defalias 'mail-narrow-to-head 'std11-narrow-to-header) + (defun mail-narrow-to-head () + "Narrow to the header section in the current buffer." + (narrow-to-region + (goto-char (point-min)) + (if (re-search-forward "^\r?$" nil 1) + (match-beginning 0) + (point-max))) + (goto-char (point-min))) (defun-maybe std11-fold-field () "Fold the current line."