From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Mauro Aranda <maurooaranda@gmail.com>
Cc: 41145@debbugs.gnu.org, Philipp Stephani <p.stephani2@gmail.com>
Subject: bug#41145: 27.0.91; small issues with `display-fill-column-indicator' Customization group
Date: Sun, 30 Aug 2020 10:51:23 -0400 [thread overview]
Message-ID: <jwv36441993.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <CABczVwfQSZeBTJBdbp8uftwt+VnywrnXNbmA8LP9uf7mR1eeAQ@mail.gmail.com> (Mauro Aranda's message of "Sun, 30 Aug 2020 08:52:41 -0300")
>> `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)))
next prev parent reply other threads:[~2020-08-30 14:51 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-09 8:30 bug#41145: 27.0.91; small issues with `display-fill-column-indicator' Customization group Philipp Stephani
2020-05-09 9:37 ` Eli Zaretskii
2020-05-09 12:31 ` Philipp Stephani
2020-08-28 14:48 ` Mauro Aranda
2020-08-29 6:54 ` Eli Zaretskii
2020-08-29 15:36 ` Stefan Monnier
2020-08-29 16:23 ` Mauro Aranda
2020-08-30 3:58 ` Stefan Monnier
2020-08-30 11:52 ` Mauro Aranda
2020-08-30 14:51 ` Stefan Monnier [this message]
2020-08-30 15:09 ` Eli Zaretskii
2020-08-30 17:03 ` Stefan Monnier
2020-09-04 2:24 ` Stefan Monnier
2020-09-04 7:09 ` Eli Zaretskii
2020-09-04 12:47 ` Stefan Monnier
2020-08-30 15:09 ` Drew Adams
2020-09-11 23:26 ` Michael Heerdegen
2020-09-12 15:43 ` Stefan Monnier
2020-09-12 18:51 ` Michael Heerdegen
2020-08-30 13:50 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwv36441993.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=41145@debbugs.gnu.org \
--cc=maurooaranda@gmail.com \
--cc=p.stephani2@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).