[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?
global-auto-composition-mode
global-auto-revert-mode
global-cwarn-mode
global-font-lock-mode
global-hi-lock-mode
global-hl-line-mode
global-reveal-mode
global-whitespace-mode
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.
-Miles
--
`Life is a boundless sea of bitterness'
- Re: global minor modes that can be overridden locally? [was: highlight-changes-mode], (continued)
- Re: global minor modes that can be overridden locally? [was: highlight-changes-mode], Richard Stallman, 2006/12/10
- Re: global minor modes that can be overridden locally? [was: highlight-changes-mode], Lennart Borgman, 2006/12/10
- RE: global minor modes that can be overridden locally? [was: highlight-changes-mode], Drew Adams, 2006/12/10
- Re: global minor modes that can be overridden locally? [was: highlight-changes-mode], Lennart Borgman, 2006/12/10
- RE: global minor modes that can be overridden locally? [was: highlight-changes-mode], Drew Adams, 2006/12/10
- Re: global minor modes that can be overridden locally? [was: highlight-changes-mode], Richard Stallman, 2006/12/11
- Re: global minor modes that can be overridden locally? [was: highlight-changes-mode], Lennart Borgman, 2006/12/11
- Re: global minor modes that can be overridden locally? [was: highlight-changes-mode], Richard Stallman, 2006/12/12
- Re: global minor modes that can be overridden locally? [was: highlight-changes-mode], Lennart Borgman, 2006/12/12
- RE: global minor modes that can be overridden locally? [was: highlight-changes-mode], Drew Adams, 2006/12/11
- Re: global minor modes that can be overridden locally?,
Miles Bader <=
- RE: global minor modes that can be overridden locally?, Drew Adams, 2006/12/12
- RE: global minor modes that can be overridden locally?, Drew Adams, 2006/12/29
- Re: global minor modes that can be overridden locally?, Stefan Monnier, 2006/12/29
- RE: global minor modes that can be overridden locally?, Drew Adams, 2006/12/29
- Re: global minor modes that can be overridden locally?, Richard Stallman, 2006/12/30
- RE: global minor modes that can be overridden locally?, Drew Adams, 2006/12/30
- Re: global minor modes that can be overridden locally?, Richard Stallman, 2006/12/30
- Re: global minor modes that can be overridden locally?, Kim F. Storm, 2006/12/30
- Re: global minor modes that can be overridden locally?, Lennart Borgman (gmail), 2006/12/30
- Re: global minor modes that can be overridden locally?, Richard Stallman, 2006/12/30