aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2004-11-06 12:10:38 +0000
committerEli Zaretskii2004-11-06 12:10:38 +0000
commit00958fa2aa6b521f820b5baf3f3fc71176af8789 (patch)
tree5a24299b00e63ac450541e51e5e0bcbd12cecc41
parent14e32dd3390b7bd60a84c121c023c5d5c0480d99 (diff)
downloademacs-00958fa2aa6b521f820b5baf3f3fc71176af8789.tar.gz
emacs-00958fa2aa6b521f820b5baf3f3fc71176af8789.zip
(hide-body): Don't hide lines at the top of the file
that precede the first header line.
-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."
723 (progn (outline-next-preface) (point)) nil))) 723 (progn (outline-next-preface) (point)) nil)))
724 724
725(defun hide-body () 725(defun hide-body ()
726 "Hide all of buffer except headings." 726 "Hide all body lines in buffer, leaving all headings visible."
727 (interactive) 727 (interactive)
728 (hide-region-body (point-min) (point-max))) 728 (hide-region-body (point-min) (point-max)))
729 729
@@ -738,7 +738,8 @@ Show the heading too, if it is currently invisible."
738 (narrow-to-region start end) 738 (narrow-to-region start end)
739 (goto-char (point-min)) 739 (goto-char (point-min))
740 (if (outline-on-heading-p) 740 (if (outline-on-heading-p)
741 (outline-end-of-heading)) 741 (outline-end-of-heading)
742 (outline-next-preface))
742 (while (not (eobp)) 743 (while (not (eobp))
743 (outline-flag-region (point) 744 (outline-flag-region (point)
744 (progn (outline-next-preface) (point)) t) 745 (progn (outline-next-preface) (point)) t)