* enable outline-minor-mode at startup
@ 2009-02-03 20:52 Ritchie
2009-02-04 3:21 ` Kevin Rodgers
[not found] ` <mailman.6690.1233717721.26697.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 3+ messages in thread
From: Ritchie @ 2009-02-03 20:52 UTC (permalink / raw)
To: help-gnu-emacs
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?
Thank you
- R
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: enable outline-minor-mode at startup
2009-02-03 20:52 enable outline-minor-mode at startup Ritchie
@ 2009-02-04 3:21 ` Kevin Rodgers
[not found] ` <mailman.6690.1233717721.26697.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 3+ messages in thread
From: Kevin Rodgers @ 2009-02-04 3:21 UTC (permalink / raw)
To: help-gnu-emacs
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
^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <mailman.6690.1233717721.26697.help-gnu-emacs@gnu.org>]
* Re: enable outline-minor-mode at startup
[not found] ` <mailman.6690.1233717721.26697.help-gnu-emacs@gnu.org>
@ 2009-02-04 4:14 ` Ritchie
0 siblings, 0 replies; 3+ messages in thread
From: Ritchie @ 2009-02-04 4:14 UTC (permalink / raw)
To: help-gnu-emacs
On Feb 3, 7:21 pm, Kevin Rodgers <kevin.d.rodg...@gmail.com> wrote:
> 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
They worked great !! I really appreciate it !
regards
- R
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-02-04 4:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-03 20:52 enable outline-minor-mode at startup Ritchie
2009-02-04 3:21 ` Kevin Rodgers
[not found] ` <mailman.6690.1233717721.26697.help-gnu-emacs@gnu.org>
2009-02-04 4:14 ` Ritchie
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).