unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Peter Heslin <usenet@heslin.eclipse.co.uk>
Subject: Re: outline-minor-mode with text before first heading
Date: Thu, 21 Oct 2004 08:04:18 +0000 (UTC)	[thread overview]
Message-ID: <cl7qi2$9l0$1@sea.gmane.org> (raw)
In-Reply-To: cl73i7$v63$1@sea.gmane.org

On 2004-10-21, Peter Heslin <usenet@heslin.eclipse.co.uk> 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))

  reply	other threads:[~2004-10-21  8:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-21  1:31 outline-minor-mode with text before first heading Peter Heslin
2004-10-21  8:04 ` Peter Heslin [this message]
2004-10-22 10:47 ` Richard Stallman
2004-10-22 19:32   ` Stefan
2004-10-22 20:53   ` Peter Heslin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='cl7qi2$9l0$1@sea.gmane.org' \
    --to=usenet@heslin.eclipse.co.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).