Mercurial > emacs
changeset 57974:be8ba6e58a49
(hide-body): Don't hide lines at the top of the file
that precede the first header line.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Sat, 06 Nov 2004 12:10:38 +0000 |
parents | 418486d3f6dd |
children | 350952e778dd |
files | lisp/outline.el |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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)