GNU bug report logs - #11301
24.1.50; `define-minor-mode' should set `custom-mode-group' according to :group

Previous Next

Package: emacs;

Reported by: "Drew Adams" <drew.adams <at> oracle.com>

Date: Sat, 21 Apr 2012 17:20:01 UTC

Severity: wishlist

Found in version 24.1.50

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 11301 <at> debbugs.gnu.org, Drew Adams <drew.adams <at> oracle.com>
Subject: bug#11301: 24.1.50; `define-minor-mode' should set `custom-mode-group' according to :group
Date: Thu, 03 Jun 2021 09:45:34 +0200
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

> Since the `:group` was only used for the `defcustom`, I just removed
> this special handling.  It doesn't mean it doesn't work any more, but
> now it's just another one of the keyword args that are simply passed
> as-is to `defcustom`.

Ah, I see.  But it seems like `define-minor-mode' just discards :group
now.  Here's a test case:

(define-minor-mode foo-mode "doc" :group 'mouse)

Since this isn't a global minor mode, we end up in this branch:

         ((not globalp)
          `(progn
             :autoload-end
             (defvar-local ,mode ,init-value
               ,(concat (format "Non-nil if %s is enabled.\n" pretty-name)
                        (internal--format-docstring-line
                         "Use the command `%s' to change this variable." mode)))))

and :group (which ends up in `extra-keywords') isn't used.  Should this
instead use `defcustom' with :local t?  I.e., basically merge with the
global case in that cond?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 99 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.