* bug#3566: 23.0.94; explain why not to use group defined by define-minor-mode
@ 2009-06-14 20:23 Drew Adams
2011-07-12 14:07 ` Lars Magne Ingebrigtsen
2016-04-27 20:02 ` Lars Ingebrigtsen
0 siblings, 2 replies; 4+ messages in thread
From: Drew Adams @ 2009-06-14 20:23 UTC (permalink / raw
To: emacs-pretest-bug
In the Elisp manual and in the doc string for define-minor-mode, we
are told not to use the custom group that is automatically defined for
the mode variable, unless we have explicitly used defgroup to define
the group.
Why? Please provide some explanation.
If you use `define-globalized-minor-mode', then the generated group
(with the name of the _local_ minor mode) is recognized by
`customize-group', and the mode variable for the global mode is
recognized by `customize-variable'.
Why is it inadvisable to use the same generated group for other
defcustoms without explicitly defining the group? What negative
consequences arise if that is attempted? Please explain in the doc.
The Elisp manual, node Defining Minor Modes, seems to refer you to
node `Group Definitions' for the explanation of this warning, but
there is no such explanation there:
"*Warning:* don't use this default group name unless you have
written a `defgroup' to define that group properly. *Not
Group Definitions."
In GNU Emacs 23.0.94.1 (i386-mingw-nt5.1.2600)
of 2009-05-24 on SOFT-MJASON
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4)'
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#3566: 23.0.94; explain why not to use group defined by define-minor-mode
2009-06-14 20:23 bug#3566: 23.0.94; explain why not to use group defined by define-minor-mode Drew Adams
@ 2011-07-12 14:07 ` Lars Magne Ingebrigtsen
2016-04-27 20:02 ` Lars Ingebrigtsen
1 sibling, 0 replies; 4+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-07-12 14:07 UTC (permalink / raw
To: Drew Adams; +Cc: 3566
"Drew Adams" <drew.adams@oracle.com> writes:
> In the Elisp manual and in the doc string for define-minor-mode, we
> are told not to use the custom group that is automatically defined for
> the mode variable, unless we have explicitly used defgroup to define
> the group.
>
> Why? Please provide some explanation.
>
> If you use `define-globalized-minor-mode', then the generated group
> (with the name of the _local_ minor mode) is recognized by
> `customize-group', and the mode variable for the global mode is
> recognized by `customize-variable'.
>
> Why is it inadvisable to use the same generated group for other
> defcustoms without explicitly defining the group? What negative
> consequences arise if that is attempted? Please explain in the doc.
>
> The Elisp manual, node Defining Minor Modes, seems to refer you to
> node `Group Definitions' for the explanation of this warning, but
> there is no such explanation there:
>
> "*Warning:* don't use this default group name unless you have
> written a `defgroup' to define that group properly. *Not
> Group Definitions."
Yes, this seems rather puzzling. Anybody know the reason?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog http://lars.ingebrigtsen.no/
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#3566: 23.0.94; explain why not to use group defined by define-minor-mode
2009-06-14 20:23 bug#3566: 23.0.94; explain why not to use group defined by define-minor-mode Drew Adams
2011-07-12 14:07 ` Lars Magne Ingebrigtsen
@ 2016-04-27 20:02 ` Lars Ingebrigtsen
2016-04-27 20:04 ` Lars Ingebrigtsen
1 sibling, 1 reply; 4+ messages in thread
From: Lars Ingebrigtsen @ 2016-04-27 20:02 UTC (permalink / raw
To: Drew Adams; +Cc: 3566
"Drew Adams" <drew.adams@oracle.com> writes:
> In the Elisp manual and in the doc string for define-minor-mode, we
> are told not to use the custom group that is automatically defined for
> the mode variable, unless we have explicitly used defgroup to define
> the group.
>
> Why? Please provide some explanation.
This is the last change to that part:
:group GROUP Custom group name to use in all generated `defcustom' forms.
Defaults to MODE without the possible trailing \"-mode\".
- (This default may not be a valid customization group defined
- with `defgroup'. Make sure it is.)
+ Don't use this default group name unless you have written a
+ `defgroup' to define that group properly.
The previous version may have been clearer? I think what it's trying to
say is that if you have a :group, then you should make sure to add a
defgroup to that symbol.
> Why is it inadvisable to use the same generated group for other
> defcustoms without explicitly defining the group? What negative
> consequences arise if that is attempted? Please explain in the doc.
Presumably this is because there are things in a defgroup that should be
there, but aren't if you don't use a defgroup? I.e., :link and a name
for the group.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#3566: 23.0.94; explain why not to use group defined by define-minor-mode
2016-04-27 20:02 ` Lars Ingebrigtsen
@ 2016-04-27 20:04 ` Lars Ingebrigtsen
0 siblings, 0 replies; 4+ messages in thread
From: Lars Ingebrigtsen @ 2016-04-27 20:04 UTC (permalink / raw
To: Drew Adams; +Cc: 3566
Lars Ingebrigtsen <larsi@gnus.org> writes:
> :group GROUP Custom group name to use in all generated `defcustom' forms.
> Defaults to MODE without the possible trailing \"-mode\".
> - (This default may not be a valid customization group defined
> - with `defgroup'. Make sure it is.)
> + Don't use this default group name unless you have written a
> + `defgroup' to define that group properly.
>
> The previous version may have been clearer? I think what it's trying to
> say is that if you have a :group, then you should make sure to add a
> defgroup to that symbol.
Actually, I think it's clear enough as it is without spelling out the
rationale behind this.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-04-27 20:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-14 20:23 bug#3566: 23.0.94; explain why not to use group defined by define-minor-mode Drew Adams
2011-07-12 14:07 ` Lars Magne Ingebrigtsen
2016-04-27 20:02 ` Lars Ingebrigtsen
2016-04-27 20:04 ` Lars Ingebrigtsen
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.