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:48:59 -0700 Message-ID: References: <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 1335030582 18426 80.91.229.3 (21 Apr 2012 17:49:42 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 21 Apr 2012 17:49:42 +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:49:41 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 1SLeRH-0006MH-He for geb-bug-gnu-emacs@m.gmane.org; Sat, 21 Apr 2012 19:49:39 +0200 Original-Received: from localhost ([::1]:42825 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SLeRG-0007FY-VU for geb-bug-gnu-emacs@m.gmane.org; Sat, 21 Apr 2012 13:49:38 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:38072) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SLeRE-0007FJ-De for bug-gnu-emacs@gnu.org; Sat, 21 Apr 2012 13:49:37 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SLeRA-0005lN-VB for bug-gnu-emacs@gnu.org; Sat, 21 Apr 2012 13:49:35 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:44907) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SLeRA-0005lH-Rl for bug-gnu-emacs@gnu.org; Sat, 21 Apr 2012 13:49:32 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SLeRf-0006Is-Q9 for bug-gnu-emacs@gnu.org; Sat, 21 Apr 2012 13:50:03 -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:50:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11301 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 11301-submit@debbugs.gnu.org id=B11301.133503059124185 (code B ref 11301); Sat, 21 Apr 2012 17:50:03 +0000 Original-Received: (at 11301) by debbugs.gnu.org; 21 Apr 2012 17:49:51 +0000 Original-Received: from localhost ([127.0.0.1]:45937 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SLeRS-0006Hz-Ln for submit@debbugs.gnu.org; Sat, 21 Apr 2012 13:49:51 -0400 Original-Received: from rcsinet15.oracle.com ([148.87.113.117]:36874) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SLeRN-0006HW-GB for 11301@debbugs.gnu.org; Sat, 21 Apr 2012 13:49:46 -0400 Original-Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by rcsinet15.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id q3LHn7ws021231 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for <11301@debbugs.gnu.org>; Sat, 21 Apr 2012 17:49:08 GMT Original-Received: from acsmt356.oracle.com (acsmt356.oracle.com [141.146.40.156]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q3LHn7De002075 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for <11301@debbugs.gnu.org>; Sat, 21 Apr 2012 17:49:07 GMT Original-Received: from abhmt107.oracle.com (abhmt107.oracle.com [141.146.116.59]) by acsmt356.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q3LHn6Bu012387 for <11301@debbugs.gnu.org>; Sat, 21 Apr 2012 12:49:06 -0500 Original-Received: from dradamslap1 (/10.159.63.181) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 21 Apr 2012 10:49:06 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <3208B35C4FFE47FFBD0A7029AB2DBB8C@us.oracle.com> Thread-Index: Ac0f4shWQLNdAJ0/SxWaZVdeS5iMoQAAYosQ X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090208.4F92F314.0062,ss=1,re=0.000,fgs=0 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:59367 Archived-At: OK, so I looked a bit further. For major or minor mode `foo-mode': `custom-group-of-mode' checks for property `custom-mode-group' on the symbol `foo-mode'. Lacking that, it checks for property `custom-group' on the same symbol. Lacking that, it checks for `custom-group' on symbol `foo'. So if we look at `icomplete-mode', which is defined using `define-minor-mode' specifying :group as `icomplete': (custom-group-of-mode 'icomplete-mode) returns non-nil, because symbol `icomplete' gets property `custom-group'. Where does that come from? It seems to come from the :group. But the :group value is not applied as property `custom-group' to the _mode_ symbol. It is applied only to the :group value itself. E.g., with :group 'Foo, property `custom-group' is applied to the symbol `Foo' but not (also) to the mode name `foo-mode' or even `foo'. So if you use as the :group value something that is not _identical_ to the mode-function symbol (or that minus `-mode'), then `custom-group-of-mode' does not work. Its attempt to find the mode's group is too limited. If you use :group 'Foo or :group 'Foos, you are out of luck. You must use :group 'foo for `foo-mode' to be recognized by `custom-group-of-mode'. (And no such limitations are documented.) Please DTRT: pick up whatever :group specifies as the group and include it in the value of property `custom-group' for the mode name.