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

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

Re: How to apply a minor mode to all buffers


From: Stefan Monnier
Subject: Re: How to apply a minor mode to all buffers
Date: Wed, 17 Jan 2007 22:20:50 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.92 (gnu/linux)

> Hello, I am a new and relatively inexperienced emacs user.  I was wondering
> if there was an easy way to make a minor mode apply to all created buffers.
> I want to do this so that I can use the column marker mode in all of my
> buffers.

> So far I have tried applying the mode through mode hooks, but this strategy
> is unsuccessful for modes that do not provide a hook.  Also, it seems like a
> bit of a hack, so I thought perhaps there might be a better way.

> Any advice for the newbie?

In Emacs-CVS (to become Emacs-22) there is a macro
`define-global-minor-mode' which can create a global mode (that applies to
"all" buffers) from a local minor mode (which can only be turned on one
buffer at a time).

That should do the trick for you, although a newbie will probably need extra
help to make use of it.

Also it's being renamed as we speak.


        Stefan


reply via email to

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