[Top][All Lists]

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

Re: global minor modes that can be overridden locally?

From: Miles Bader
Subject: Re: global minor modes that can be overridden locally?
Date: Tue, 12 Dec 2006 13:25:16 +0900

"Drew Adams" <address@hidden> writes:
>> Two different commands is the way we do it now.
>> In the current scheme; foo-mode is the local toggle
>> and global-foo-mode is the global toggle.
> Uh, I never heard of global-*-mode. Is that documented?


They are documented.

> I define a global minor mode using define-minor-mode with :global, and M-x
> foo-mode is the global toggle for it. There is no global-foo-mode defined
> for my mode by define-minor-mode with :global.

You are confusing two slightly different situations.

There are "true" global modes, which _only_ have a global effect, and
wouldn't make sense as a local mode; an example is `tool-bar-mode'.
Such modes are called FOO-mode because it is the obvious name (and
adding "global-" to the beginning would be pointless and annoying).

However there are global modes which are actually the effect of applying
a local mode globally, that is, they enable or disable the corresponding
local mode in all buffers.  Such modes are called global-FOO-mode,
because the fundamental mode in question is the local FOO-mode, and
global-FOO-mode is merely a convenient adjunct.


`Life is a boundless sea of bitterness'

reply via email to

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