[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: Drew Adams
Subject: RE: global minor modes that can be overridden locally?
Date: Fri, 29 Dec 2006 08:25:00 -0800

`define-global-minor-mode' is new in Emacs 22. I think we have the
opportunity now to correct its name to avoid confusing users.

There are minor modes that are truly global, defined with
`define-minor-mode' using `:global'. And there are minor modes defined with
`define-global-minor-mode', which are local minor modes that are made to act
globally. These two kinds of "global" minor mode are not the same. We should
change the way we refer to minor modes that are defined as local modes but
then made to act globally - we should not refer to them as global modes.

I wrote this earlier:

> It sounds like the pseudo global modes are not global modes, but
> local modes that are applied globally. If that's the case, then
> perhaps that's the best way to speak of them: don't call them
> global, but speak of them being applied globally. Perhaps rename
> `define-global-minor-mode' to `make-minor-mode-global' (a la
> `make-variable-buffer-local'), since the input is a minor mode
> and you are, in effect, making it serve globally (IIUC). Even
> that characterization of being applied globally (vs being
> inherently global) sounds like too fine a nuance and a possible
> source of confusion, however.

I don't see a good way to avoid the lesser confusion mentioned in the last
sentence, but I do think we should at least change the name of
`define-global-minor-mode' to something like `make-minor-mode-global'.

reply via email to

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