help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: enable outline-minor-mode at startup


From: Kevin Rodgers
Subject: Re: enable outline-minor-mode at startup
Date: Tue, 03 Feb 2009 20:21:46 -0700
User-agent: Thunderbird 2.0.0.19 (Macintosh/20081209)

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 via email to

[Prev in Thread] Current Thread [Next in Thread]