unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Re: load a minor mode automatically
  2003-02-14 17:36 load a minor mode automatically Luca Ferrari
@ 2003-02-14 17:35 ` Kai Großjohann
  0 siblings, 0 replies; 2+ messages in thread
From: Kai Großjohann @ 2003-02-14 17:35 UTC (permalink / raw)


Luca Ferrari <fluca1978@libero.it> writes:

> I'm a newbie of Emacs, I've tried to find my solution on the Emacs manual, 
> but I can't:
> how to load automatically a minor mode modifing my .emacs file?

Maybe it's easier if you describe which minor mode you want and under
which circumstances.

For example, to enable auto-fill (it's a minor mode) for all
text-like modes (major modes), do this:

(add-hook 'text-mode-hook 'turn-on-auto-fill)

Other minor modes might not have a turn-on function.  (Does auto-fill
turn you on? ;-)  So you have to write it yourself:

(defun luca-turn-on-foo-mode ()
  (foo-mode 1))

Let's say you want to enable foo-mode for C++ mode, then you need the
above, plus:

(add-hook 'c++-mode-hook 'luca-turn-on-foo-mode)

-- 
A turnip curses Elvis

^ permalink raw reply	[flat|nested] 2+ messages in thread

* load a minor mode automatically
@ 2003-02-14 17:36 Luca Ferrari
  2003-02-14 17:35 ` Kai Großjohann
  0 siblings, 1 reply; 2+ messages in thread
From: Luca Ferrari @ 2003-02-14 17:36 UTC (permalink / raw)


Hi,
I'm a newbie of Emacs, I've tried to find my solution on the Emacs manual, 
but I can't:
how to load automatically a minor mode modifing my .emacs file?

Thanks

-- 
Luca Ferrari,
fluca1978@libero.it

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-02-14 17:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-02-14 17:36 load a minor mode automatically Luca Ferrari
2003-02-14 17:35 ` Kai Großjohann

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).