Mercurial > emacs
changeset 20854:2d4cea4b9e81
(rmail-clear-headers): Handle the last header in a message correctly.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Fri, 06 Feb 1998 06:57:40 +0000 |
parents | 58bb74217a10 |
children | 4ab361c28043 |
files | lisp/mail/rmail.el |
diffstat | 1 files changed, 9 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/mail/rmail.el Fri Feb 06 06:17:17 1998 +0000 +++ b/lisp/mail/rmail.el Fri Feb 06 06:57:40 1998 +0000 @@ -1636,16 +1636,18 @@ (if (and rmail-displayed-headers (null ignored-headers)) (save-restriction (narrow-to-region (point-min) (point)) - (let (lim) + (let (lim next) (goto-char (point-min)) - (while (save-excursion - (re-search-forward "\n[^ \t]") - (and (not (eobp)) - (setq lim (1- (point))))) + (while (and (not (eobp)) + (save-excursion + (if (re-search-forward "\n[^ \t]" nil t) + (setq lim (match-beginning 0) + next (1+ lim)) + (setq lim nil next (point-max))))) (if (save-excursion (re-search-forward rmail-displayed-headers lim t)) - (goto-char lim) - (delete-region (point) lim)))) + (goto-char next) + (delete-region (point) next)))) (goto-char (point-min))) (or ignored-headers (setq ignored-headers rmail-ignored-headers)) (save-restriction