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

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

Re: Best way to turn on a mode *always*?


From: Peter Milliken
Subject: Re: Best way to turn on a mode *always*?
Date: Mon, 1 Dec 2008 09:02:27 +1100

There is probably some global way to set it ALWAYS but...

I define a lambda function that I hook in for all my major modes and then put all the stuff I want turned on in it i.e. the following is typical of what I have in my .emacs

(add-hook 'ada-mode-hook
          (lambda ()
            ;; add your customizations here... this can set
            ;; variables, turn on minor modes, etc.
            (tmmofl-mode)
            (show-paren-mode)
            (else-mode)
            (setq else-follow-menus nil)))

Since I only ever look at a limited set of file types i.e. major modes, this has worked perfectly well for me.

Peter

On Mon, Dec 1, 2008 at 5:18 AM, seberino@spawar.navy.mil <seberino@spawar.navy.mil> wrote:
Some modes like Auto Fill mode only get turned on for a specific
buffer.
When you change buffers you are NOT in Auto Fill mode anymore!

How turn on a mode ALWAYS?

This works but I wonder if there is a simpler way that will work for
other modes:

(add-hook 'find-file-hooks 'turn-on-auto-fill)

Chris


reply via email to

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