[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: outline-minor-mode with text before first heading
From: |
Peter Heslin |
Subject: |
Re: outline-minor-mode with text before first heading |
Date: |
Thu, 21 Oct 2004 08:04:18 +0000 (UTC) |
User-agent: |
slrn/0.9.8.0 (Linux) |
On 2004-10-21, Peter Heslin <address@hidden> wrote:
> I'll append the patch.
Actually, this is a better patch, since it does the right thing if you
happen to use a prefix arg when there is no text before the first
heading.
725,728c725,729
< (defun hide-body ()
< "Hide all of buffer except headings."
< (interactive)
< (hide-region-body (point-min) (point-max)))
---
> (defun hide-body (&optional no-prelim)
> "Hide all of buffer except headings. If NO-PRELIM is t, do not
> hide text before the first heading"
> (interactive "P")
> (hide-region-body (point-min) (point-max) no-prelim))
730,731c731,733
< (defun hide-region-body (start end)
< "Hide all body lines in the region, but not headings."
---
> (defun hide-region-body (start end &optional no-prelim)
> "Hide all body lines in the region, but not headings. If
> NO-PRELIM is t, do not hide text before the first heading"
739a742,744
> (when (and no-prelim
> (not (outline-on-heading-p)))
> (outline-next-preface))