diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2020-09-09 13:29:59 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2020-09-09 13:30:20 -0400 |
commit | 6e7736ac5f42e2f1b17aacdfb2a60d8bb951d038 (patch) | |
tree | 8d6086bd706f2c0cae44c3668c6167fc0a64bfea /lisp/emacs-lisp | |
parent | 9de9976de003b94d7496a55d4d643ac31514d520 (diff) | |
download | emacs-6e7736ac5f42e2f1b17aacdfb2a60d8bb951d038.tar.gz |
(define-minor-mode): Don't compute a default :group (bug#41145)
* lisp/emacs-lisp/easy-mmode.el (define-minor-mode): Rely on the
`defcustom`s own defaulting for the :group.
* lisp/display-fill-column-indicator.el
(global-display-fill-column-indicator-mode): Remove now redundant :group.
* lisp/cus-dep.el (custom--get-def): New function.
(custom-make-dependencies): Use it.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/easy-mmode.el | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el index 24c9e79f2c1..e3eb9294ed6 100644 --- a/lisp/emacs-lisp/easy-mmode.el +++ b/lisp/emacs-lisp/easy-mmode.el @@ -1,4 +1,4 @@ -;;; easy-mmode.el --- easy definition for major and minor modes +;;; easy-mmode.el --- easy definition for major and minor modes -*- lexical-binding: t; -*- ;; Copyright (C) 1997, 2000-2020 Free Software Foundation, Inc. @@ -157,9 +157,6 @@ BODY contains code to execute each time the mode is enabled or disabled. 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 @@ For example, you could write (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))) |