emacs-devel
[Top][All Lists]
Advanced

[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 14:40:44 -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.
>
> As the original inventor of the name (and code) of
> define-global-minor-mode,
> I agree that it's not ideal.  I hope we can come up with something better.
> But note that the operation really defines a new global minor mode whose
> effect is to turn on in most buffers the other (buffer-local) minor-mode.
> Calling it make-minor-mode-global would be wrong, because it would make it
> seem like it will change the buffer-local minor-mode to a global one,
> whereas the buffer-local minor-mode is actually unaffected.

I see. So it is not quite analogous to `make-variable-buffer-local'.

I do think it's important that we come up with some name, now, that doesn't
encourage confusion of this with the true global minor mode (via :global t).
If we don't do that now, it will engender confusion that lasts, I fear.

I don't really have a better name suggestion than `make-minor-mode-global',
which I think is anyway better than `define-global-minor-mode'. BTW, I came
up with that name based on the first line of the doc string: "Make
global-mode out of the buffer-local minor mode." If that macro name is
misleading, for the reason you gave, then so is the first line of the doc
string, IMO. And the doc string should be at least as clear as the macro
name.

If a longer name can be tolerated, perhaps something like
`make-global-minor-mode-for-local-minor-mode' (ugh!) or
`make-global-for-local-minor-mode' (ugh) or `globally-extend-minor-mode'.
Maybe that last one is OK, but the doc string needs to explain well what the
nebulous "extend" means.

Anyone have a good idea? I really think we should try to come up with a good
name now, before the release.





reply via email to

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