unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Kevin Rodgers <kevin.d.rodgers@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: enable outline-minor-mode at startup
Date: Tue, 03 Feb 2009 20:21:46 -0700	[thread overview]
Message-ID: <gmb1k9$8bf$1@ger.gmane.org> (raw)
In-Reply-To: <d3194e1e-88d2-4358-bbbd-5e3360d9776d@z28g2000prd.googlegroups.com>

Ritchie wrote:
> I'm wondering if there is a way to enable the outline-minor-mode at
> startup. Without it, when I try to hide function body using command
> "hide-subtree", the hided function looks as if it is empty. Outline-
> minor-mode will have "..." indicating the body is hidden. When I put
> (outline-minor-mode 1) in .emacs, there is no effect, I still have to
> start it manually for each buffer.
> 
> Anybody know how to start outline-minor-mode automatically? Or, is
> there other methods are used for hiding function bodies?

1. (add-hook 'FOO-mode-hook (lambda () (outline-minor-mode 1)))

    where FOO-mode is the relevant major mode.

2. (add-hook 'find-file-hook (lambda () (outline-minor-mode 1)))
    (add-hook 'find-file-not-found-functions
    	     (lambda () (progn (outline-minor-mode 1) nil)))

3. Or try define-globalized-minor-mode.

-- 
Kevin Rodgers
Denver, Colorado, USA





  reply	other threads:[~2009-02-04  3:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-03 20:52 enable outline-minor-mode at startup Ritchie
2009-02-04  3:21 ` Kevin Rodgers [this message]
     [not found] ` <mailman.6690.1233717721.26697.help-gnu-emacs@gnu.org>
2009-02-04  4:14   ` Ritchie

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='gmb1k9$8bf$1@ger.gmane.org' \
    --to=kevin.d.rodgers@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /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.
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).