From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Compilation warnings in mouse.el Date: Wed, 13 Jul 2016 18:36:11 +0300 Message-ID: <83wpkp8s9g.fsf@gnu.org> References: <8360scdzik.fsf@gnu.org> <87zipnzvo4.fsf@gmx.net> <8337nfcupy.fsf@gnu.org> <83inw9a9tl.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1468424217 16051 80.91.229.3 (13 Jul 2016 15:36:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 13 Jul 2016 15:36:57 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jul 13 17:36:51 2016 Return-path: Envelope-to: ged-emacs-devel@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 1bNMDO-0005Ju-Nw for ged-emacs-devel@m.gmane.org; Wed, 13 Jul 2016 17:36:46 +0200 Original-Received: from localhost ([::1]:48455 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNMDK-00019s-IF for ged-emacs-devel@m.gmane.org; Wed, 13 Jul 2016 11:36:42 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38753) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNMDA-000188-KX for emacs-devel@gnu.org; Wed, 13 Jul 2016 11:36:33 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bNMD6-000260-R9 for emacs-devel@gnu.org; Wed, 13 Jul 2016 11:36:31 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:56391) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNMD6-00025q-NX; Wed, 13 Jul 2016 11:36:28 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4097 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bNMD4-0000GS-Oj; Wed, 13 Jul 2016 11:36:27 -0400 In-reply-to: (message from Stefan Monnier on Wed, 13 Jul 2016 11:12:35 -0400) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:205645 Archived-At: > From: Stefan Monnier > Date: Wed, 13 Jul 2016 11:12:35 -0400 > > >> The way I see it, defcustoms should pretty much never have :group, and > >> the group to which they belong is simply determined by the file in which > >> they occur. > > But as long as such a system isn't installed, we shouldn't behave as > > if it were. (And what you propose is not without downsides, I think.) > > Such a system has been installed ever since > > commit d3b80e9b70eaa0edb4cfc0d91543c41929fa70c0 > Author: Stefan Monnier > Date: Sun Nov 18 01:35:12 2001 +0000 > > (custom-current-group-alist): New var. > (custom-declare-group): Set it. > (custom-current-group): New fun. > (custom-declare-variable, custom-handle-all-keywords): > Use it as a default if no :group argument is specified. No, I meant a system where one doesn't have to do anything to have a group for a defcustom. Nothing at all. If they must first check if there's a defgroup in the same file, and then if there's more than one defgroup, make sure the defcustom is after the right one, then this is an error-prone system which cannot be trusted. > >> I don't see how removing/adding defcustoms in the same file > >> would introduce problems. > > We just saw such a problem, no? > > I must have missed something. All I saw was that someone added > a defcustom in mouse.el and did not put a :group while there is no > defgroup in that file (and all other defcustoms in there have a :group). > > That seems pretty far from "removing/adding defcustoms in the same file". OK, s/defcustom/defgroup/. > But I'm opposed to having it be mandatory in the obvious case of > a single-file single-group package, where the :group args are just > redundant. My above 2001 commit was designed to solve that case and > it's proved to work fine since. IME, solving part of a problem doesn't really solve it.