From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: kai.grossjohann@uni-duisburg.de (Kai =?iso-8859-1?q?Gro=DFjohann?=) Newsgroups: gmane.emacs.help Subject: Re: load a minor mode automatically Date: Fri, 14 Feb 2003 18:35:23 +0100 Organization: University of Duisburg, Germany Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <848ywi4vfo.fsf@lucy.is.informatik.uni-duisburg.de> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1045244406 9050 80.91.224.249 (14 Feb 2003 17:40:06 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 14 Feb 2003 17:40:06 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18jjoe-0002Kb-00 for ; Fri, 14 Feb 2003 18:40:00 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18jjoy-0001Q1-08 for gnu-help-gnu-emacs@m.gmane.org; Fri, 14 Feb 2003 12:40:20 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!proxad.net!fr.usenet-edu.net!usenet-edu.net!fu-berlin.de!uni-berlin.de!pd951faea.dip.t-dialin.NET!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 27 Original-NNTP-Posting-Host: pd951faea.dip.t-dialin.net (217.81.250.234) Original-X-Trace: fu-berlin.de 1045244165 47342999 217.81.250.234 (16 [73968]) User-Agent: Gnus/5.090016 (Oort Gnus v0.16) Emacs/21.3.50 Cancel-Lock: sha1:5pV/WPbvc51bgf4Tsk/q+FNLjrc= Original-Xref: shelby.stanford.edu gnu.emacs.help:110202 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:6705 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:6705 Luca Ferrari 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