bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#53153: package-quickstart: unusual autoload form in selectrum gives


From: Stefan Monnier
Subject: bug#53153: package-quickstart: unusual autoload form in selectrum gives byte-compilation warning
Date: Thu, 13 Jan 2022 09:46:21 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

> This unusual arrangement means that we end up with this interesting form
> in package-quickstart.el (pretty-printed):
>
>   (define-minor-mode selectrum-mode
>     "Minor mode to use Selectrum for `completing-read'."
>     :global t
>     (if selectrum-mode (progn
[...]

Global minor modes define a `defcustom` and its :group is usually
provided by default by the last `defgroup` but if you copy this
`define-minor-mode` to some other file (such as an autoloads file), then
you can't rely on this defaulting so you should provide
a `:group` explicitly.

Regarding using such a "trick" or placing the minor mode in its own
file, both approaches have their advantages and disadvantages so while
it's unusual I don't see a problem with it.


        Stefan






reply via email to

[Prev in Thread] Current Thread [Next in Thread]