From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#41145: 27.0.91; small issues with `display-fill-column-indicator' Customization group Date: Sun, 30 Aug 2020 10:51:23 -0400 Message-ID: References: <837dtiymay.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40549"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 41145@debbugs.gnu.org, Philipp Stephani To: Mauro Aranda Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Aug 30 16:52:11 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kCOgk-000AQB-9I for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 30 Aug 2020 16:52:10 +0200 Original-Received: from localhost ([::1]:33530 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kCOgj-0002N8-Ap for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 30 Aug 2020 10:52:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51428) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kCOgd-0002LT-7S for bug-gnu-emacs@gnu.org; Sun, 30 Aug 2020 10:52:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38967) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kCOgc-0001AZ-Tb for bug-gnu-emacs@gnu.org; Sun, 30 Aug 2020 10:52:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kCOgc-0004to-St for bug-gnu-emacs@gnu.org; Sun, 30 Aug 2020 10:52:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 30 Aug 2020 14:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41145 X-GNU-PR-Package: emacs Original-Received: via spool by 41145-submit@debbugs.gnu.org id=B41145.159879909718772 (code B ref 41145); Sun, 30 Aug 2020 14:52:02 +0000 Original-Received: (at 41145) by debbugs.gnu.org; 30 Aug 2020 14:51:37 +0000 Original-Received: from localhost ([127.0.0.1]:50509 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kCOg9-0004sf-Cq for submit@debbugs.gnu.org; Sun, 30 Aug 2020 10:51:37 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:53460) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kCOg7-0004sQ-CX for 41145@debbugs.gnu.org; Sun, 30 Aug 2020 10:51:31 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 8A9448095B; Sun, 30 Aug 2020 10:51:25 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 2B24D8066B; Sun, 30 Aug 2020 10:51:24 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1598799084; bh=Gz0uhNY4PXzzzkDkwhJZEstRCbnvh4jdFvPFreB0Kmw=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=akDxLQ0MDmEGsCWNba0+j6xyZuW4snzZcRSjKgSnLr1aEtpj2+784pBpC+5MHQXJQ iF7I25zn6096RCSMdqezVarOChitH+86pyZfgrhDbA6W8aaD9Tfug14gDIoloXBXHh goxdf4aKEhF93723djD9hzFWwOPhpbOkNL5CBq5lROmxOiTT0taEBQYrIuMeLWNLKN zZ3tx7wGU3QShtqraC8AU5bD/81ozA8TbyMA1zJsKqEMrDfDWc1fBe6OJ9xbkocYlu gkxBAR379M8ob3i/4Zvb4oi8UDUgf5fXjBVHdooDTGHIFacX3jF0SM6WIEnUJ4ToIX e9B27F+swEm/w== Original-Received: from alfajor (unknown [45.72.232.131]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id E190B12062C; Sun, 30 Aug 2020 10:51:23 -0400 (EDT) In-Reply-To: (Mauro Aranda's message of "Sun, 30 Aug 2020 08:52:41 -0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:186701 Archived-At: >> `global-display-fill-column-indicator-mode` should definitely belong to >> the `display-fill-column-indicator` group (because the `defcustom` >> doesn't have an explicit `:group` so it should fallback to using the >> last-defined group). > > Is it, though? > emacs -Q > M-x customize-option RET global-display-fill-column-indicator-mode > And near the end of buffer I read: > Groups: Global Display Fill Column Indicator Oh, indeed, it's an old misfeature that was introduced by our idiot-in-chief (tho to my defense, I think it made some sense back then because `defcustom` did not have a useful default for `:group`). We can fix it either by adding `:group 'display-fill-column-indicator` to the `define-globalized-minor-mode` or by getting rid of the misfeature, as in the patch below (this patch will likely fix a few other similar cases). Eli? Stefan diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el index 24c9e79f2c..e3eb9294ed 100644 --- a/lisp/emacs-lisp/easy-mmode.el +++ b/lisp/emacs-lisp/easy-mmode.el @@ -157,9 +157,6 @@ define-minor-mode the minor mode is global): :group GROUP Custom group name to use in all generated `defcustom' forms. - Defaults to MODE without the possible trailing \"-mode\". - Don't use this default group name unless you have written a - `defgroup' to define that group properly. :global GLOBAL If non-nil specifies that the minor mode is not meant to be buffer-local, so don't make the variable MODE buffer-local. By default, the mode is buffer-local. @@ -262,12 +259,6 @@ define-minor-mode (unless initialize (setq initialize '(:initialize 'custom-initialize-default))) - (unless group - ;; We might as well provide a best-guess default group. - (setq group - `(:group ',(intern (replace-regexp-in-string - "-mode\\'" "" mode-name))))) - ;; TODO? Mark booleans as safe if booleanp? Eg abbrev-mode. (unless type (setq type '(:type 'boolean)))