# HG changeset patch # User Eli Zaretskii # Date 1099743038 0 # Node ID be8ba6e58a4959a0d99c930b726fc6fad44c3d58 # Parent 418486d3f6dd6376cde1604783ff8f7b84efbc3e (hide-body): Don't hide lines at the top of the file that precede the first header line. diff -r 418486d3f6dd -r be8ba6e58a49 lisp/outline.el --- a/lisp/outline.el Sat Nov 06 12:06:18 2004 +0000 +++ b/lisp/outline.el Sat Nov 06 12:10:38 2004 +0000 @@ -723,7 +723,7 @@ (progn (outline-next-preface) (point)) nil))) (defun hide-body () - "Hide all of buffer except headings." + "Hide all body lines in buffer, leaving all headings visible." (interactive) (hide-region-body (point-min) (point-max))) @@ -738,7 +738,8 @@ (narrow-to-region start end) (goto-char (point-min)) (if (outline-on-heading-p) - (outline-end-of-heading)) + (outline-end-of-heading) + (outline-next-preface)) (while (not (eobp)) (outline-flag-region (point) (progn (outline-next-preface) (point)) t)