summaryrefslogtreecommitdiff
path: root/lisp/outline.el
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2004-11-06 12:10:38 +0000
committerEli Zaretskii <eliz@gnu.org>2004-11-06 12:10:38 +0000
commit00958fa2aa6b521f820b5baf3f3fc71176af8789 (patch)
tree5a24299b00e63ac450541e51e5e0bcbd12cecc41 /lisp/outline.el
parent14e32dd3390b7bd60a84c121c023c5d5c0480d99 (diff)
downloademacs-00958fa2aa6b521f820b5baf3f3fc71176af8789.tar.gz
(hide-body): Don't hide lines at the top of the file
that precede the first header line.
Diffstat (limited to 'lisp/outline.el')
-rw-r--r--lisp/outline.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/outline.el b/lisp/outline.el
index 2d2663b12f2..89e9e193e9c 100644
--- a/lisp/outline.el
+++ b/lisp/outline.el
@@ -723,7 +723,7 @@ Show the heading too, if it is currently invisible."
(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 @@ Show the heading too, if it is currently invisible."
(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)