From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.bugs Subject: bug#11301: 24.1.50; `define-minor-mode' should set `custom-mode-group' according to :group Date: Sat, 21 Apr 2012 10:18:34 -0700 Message-ID: <3208B35C4FFE47FFBD0A7029AB2DBB8C@us.oracle.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1335028778 7042 80.91.229.3 (21 Apr 2012 17:19:38 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 21 Apr 2012 17:19:38 +0000 (UTC) To: 11301@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Apr 21 19:19:37 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SLdyD-00007y-1n for geb-bug-gnu-emacs@m.gmane.org; Sat, 21 Apr 2012 19:19:37 +0200 Original-Received: from localhost ([::1]:35718 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SLdyC-0001YD-7K for geb-bug-gnu-emacs@m.gmane.org; Sat, 21 Apr 2012 13:19:36 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:50981) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SLdy9-0001Xt-9l for bug-gnu-emacs@gnu.org; Sat, 21 Apr 2012 13:19:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SLdy7-0004ta-DM for bug-gnu-emacs@gnu.org; Sat, 21 Apr 2012 13:19:32 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:44880) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SLdy7-0004tW-A6 for bug-gnu-emacs@gnu.org; Sat, 21 Apr 2012 13:19:31 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SLdyb-0005ai-WC for bug-gnu-emacs@gnu.org; Sat, 21 Apr 2012 13:20:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Drew Adams" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 21 Apr 2012 17:20:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 11301 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: Original-Received: via spool by submit@debbugs.gnu.org id=B.133502877121446 (code B ref -1); Sat, 21 Apr 2012 17:20:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 21 Apr 2012 17:19:31 +0000 Original-Received: from localhost ([127.0.0.1]:45914 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SLdy7-0005Zq-Ch for submit@debbugs.gnu.org; Sat, 21 Apr 2012 13:19:31 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:44131) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SLdy4-0005Zc-A8 for submit@debbugs.gnu.org; Sat, 21 Apr 2012 13:19:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SLdxR-0004qI-Qi for submit@debbugs.gnu.org; Sat, 21 Apr 2012 13:18:51 -0400 Original-Received: from lists.gnu.org ([208.118.235.17]:55650) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SLdxR-0004qE-N4 for submit@debbugs.gnu.org; Sat, 21 Apr 2012 13:18:49 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:50844) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SLdxP-0001R6-SA for bug-gnu-emacs@gnu.org; Sat, 21 Apr 2012 13:18:49 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SLdxN-0004pb-UC for bug-gnu-emacs@gnu.org; Sat, 21 Apr 2012 13:18:47 -0400 Original-Received: from rcsinet15.oracle.com ([148.87.113.117]:44594) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SLdxN-0004pK-Nb for bug-gnu-emacs@gnu.org; Sat, 21 Apr 2012 13:18:45 -0400 Original-Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94]) by rcsinet15.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id q3LHIgw3004617 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sat, 21 Apr 2012 17:18:43 GMT Original-Received: from acsmt357.oracle.com (acsmt357.oracle.com [141.146.40.157]) by ucsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q3LHIfTA017228 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sat, 21 Apr 2012 17:18:42 GMT Original-Received: from abhmt103.oracle.com (abhmt103.oracle.com [141.146.116.55]) by acsmt357.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q3LHIfwK005526 for ; Sat, 21 Apr 2012 12:18:41 -0500 Original-Received: from dradamslap1 (/10.159.63.181) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 21 Apr 2012 10:18:41 -0700 X-Mailer: Microsoft Office Outlook 11 Thread-Index: Ac0f4shWQLNdAJ0/SxWaZVdeS5iMoQ== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: ucsinet22.oracle.com [156.151.31.94] X-CT-RefId: str=0001.0A090202.4F92EBF3.0049,ss=1,re=0.000,fgs=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:59365 Archived-At: I just started to look at this, so forgive me if I am missing something. `define-derived-mode' picks up the :group keyword and uses it, among other things, to do this: (put ',child 'custom-mode-group ,group), that is, to declare the group as the custom-mode-group for the new mode. My suggestion is for `define-minor-mode' - and perhaps other mode-defining macros - to do likewise. `define-minor-mode' apparently uses the :group keyword only for defining the user options it defines. As it stands today, you can define a minor mode `foo' using `define-minor-mode', and then try `C-u customize-mode, but `foo' will not appear as a possible completion, because neither property `custom-mode-group' nor property `custom-group' has been applied to the symbol `foo'. This is too bad. Grepping for `custom-mode-group' shows that it is applied _only_ in `define-derived-mode', and it is used _only_ in `custom-group-of-mode', which in turn is used _only_ in `customize-mode'. Grepping for `custom-group' and filtering a bit, my impression is that that property is put on symbols only by `custom-add-to-group'. And grepping for `custom-add-to-group', it is not too clear where `custom-group' is put on symbols. Things like `custom-declare-variable' do so, but is that used by `defcustom' or does `defcustom' do likewise? In any case, I do not see a `custom-group' property on any of the user options or faces I have defined using `defcustom' and `defface'. Likewise, for the options defined by `define-minor-mode'. So what's the story here? Does `customize-mode' work only for derived modes? If so, why? Can we please DTRT so that it works (e.g. with a prefix arg) for any major or minor mode with a clearly identified :group? See related bug #11299. Please do what it takes to have major and minor modes - at least those clearly recognizable as such via `define-minor-mode' etc. and that clearly have a defined :group - be assigned the property `custom-mode-group' (or `custom-group'), so that `custom-group-of-mode' recognizes them. In GNU Emacs 24.1.50.1 (i386-mingw-nt5.1.2600) of 2012-04-19 on MARVIN Bzr revision: 107968 monnier@iro.umontreal.ca-20120419220225-gijdcbfxuiqy5dhb Windowing system distributor `Microsoft Corp.', version 5.1.2600 Configured using: `configure --with-gcc (4.6) --no-opt --enable-checking --cflags -ID:/devel/emacs/libs/libXpm-3.5.8/include -ID:/devel/emacs/libs/libXpm-3.5.8/src -ID:/devel/emacs/libs/libpng-dev_1.4.3-1/include -ID:/devel/emacs/libs/zlib-dev_1.2.5-2/include -ID:/devel/emacs/libs/giflib-4.1.4-1/include -ID:/devel/emacs/libs/jpeg-6b-4/include -ID:/devel/emacs/libs/tiff-3.8.2-1/include -ID:/devel/emacs/libs/gnutls-3.0.9/include -ID:/devel/emacs/libs/libiconv-1.13.1-1-dev/include -ID:/devel/emacs/libs/libxml2-2.7.8/include/libxml2'