[Top][All Lists]

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

Re: globalized minor modes - priority over mode hook?

From: David Reitter
Subject: Re: globalized minor modes - priority over mode hook?
Date: Wed, 28 Apr 2010 19:02:59 -0400

On Apr 28, 2010, at 6:39 PM, Stefan Monnier wrote:
>> As an aside, it would be good to have a simple way to say "I don't
>> want global mode X applied to buffers Y, Z and W."
> Yes, that would be a welcome addition.

I agree.  

Please consider hand-crafting global minor modes in some cases.

Take `visual-line-mode': What it does is to configure a number of variables, 
most of which are buffer-local:

(line-move-visual truncate-lines truncate-partial-width-windows word-wrap 

The classic way to configure a default for these would be `set-default'.  This 
seems cleaner and more efficient than automatically deriving a globalized 
version of the mode that runs (at least) at every major mode change and may 
then be turned off again by the mode hook. 

reply via email to

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