GNU bug report logs - #3566
23.0.94; explain why not to use group defined by define-minor-mode

Previous Next

Package: emacs;

Reported by: "Drew Adams" <drew.adams <at> oracle.com>

Date: Sun, 14 Jun 2009 20:30:05 UTC

Severity: minor

Tags: wontfix

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 3566 in the body.
You can then email your comments to 3566 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#3566; Package emacs. (Sun, 14 Jun 2009 20:30:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Drew Adams" <drew.adams <at> oracle.com>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Sun, 14 Jun 2009 20:30:05 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: "Drew Adams" <drew.adams <at> oracle.com>
To: <emacs-pretest-bug <at> gnu.org>
Subject: 23.0.94; explain why not to use group defined by define-minor-mode
Date: Sun, 14 Jun 2009 13:23:10 -0700
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)'
 




Severity set to 'minor' from 'normal' Request was from Glenn Morris <rgm <at> gnu.org> to control <at> emacsbugs.donarmstrong.com. (Wed, 04 Nov 2009 22:10:14 GMT) Full text and rfc822 format available.

Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#3566; Package emacs. (Tue, 12 Jul 2011 14:17:01 GMT) Full text and rfc822 format available.

Message #10 received at 3566 <at> debbugs.gnu.org (full text, mbox):

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: "Drew Adams" <drew.adams <at> oracle.com>
Cc: 3566 <at> debbugs.gnu.org
Subject: Re: 23.0.94; explain why not to use group defined by define-minor-mode
Date: Tue, 12 Jul 2011 16:07:41 +0200
"Drew Adams" <drew.adams <at> 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/




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#3566; Package emacs. (Wed, 27 Apr 2016 20:03:02 GMT) Full text and rfc822 format available.

Message #13 received at 3566 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: "Drew Adams" <drew.adams <at> oracle.com>
Cc: 3566 <at> debbugs.gnu.org
Subject: Re: bug#3566: 23.0.94;
 explain why not to use group defined by define-minor-mode
Date: Wed, 27 Apr 2016 22:02:13 +0200
"Drew Adams" <drew.adams <at> 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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#3566; Package emacs. (Wed, 27 Apr 2016 20:05:01 GMT) Full text and rfc822 format available.

Message #16 received at 3566 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: "Drew Adams" <drew.adams <at> oracle.com>
Cc: 3566 <at> debbugs.gnu.org
Subject: Re: bug#3566: 23.0.94;
 explain why not to use group defined by define-minor-mode
Date: Wed, 27 Apr 2016 22:04:19 +0200
Lars Ingebrigtsen <larsi <at> 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




Added tag(s) wontfix. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Wed, 27 Apr 2016 20:05:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 3566 <at> debbugs.gnu.org and "Drew Adams" <drew.adams <at> oracle.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Wed, 27 Apr 2016 20:05:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 26 May 2016 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 9 years and 31 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.