From: kai.grossjohann@uni-duisburg.de (Kai Großjohann)
Subject: Re: load a minor mode automatically
Date: Fri, 14 Feb 2003 18:35:23 +0100 [thread overview]
Message-ID: <848ywi4vfo.fsf@lucy.is.informatik.uni-duisburg.de> (raw)
In-Reply-To: b2j5rs$3sh$1@newsfeed.cineca.it
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
prev parent reply other threads:[~2003-02-14 17:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-14 17:36 load a minor mode automatically Luca Ferrari
2003-02-14 17:35 ` Kai Großjohann [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=848ywi4vfo.fsf@lucy.is.informatik.uni-duisburg.de \
--to=kai.grossjohann@uni-duisburg.de \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.