Subject: bug#77311: Minor documentation fix (`use-package')

From: Dominik Schrempf <[email-masked]>
Date: Sat, 29 Mar 2025 14:54:39 +0100

Hi,

thanks for your comments.

Please find attached the updated patch. I still changed the tense used
in the documentation of `:commands'.

Best,
Dominik

>From c0d881d651c6998650d2c895b3e5f39a2c3c8078 Mon Sep 17 00:00:00 2001
From: Dominik Schrempf <[email-masked]>
Date: Thu, 27 Mar 2025 15:54:52 +0100
Subject: [PATCH] Fix minor issues in documentation of `use-package'

---
 lisp/use-package/use-package-core.el | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lisp/use-package/use-package-core.el b/lisp/use-package/use-package-core.el
index 84ff637435a..630ee83601c 100644
--- a/lisp/use-package/use-package-core.el
+++ b/lisp/use-package/use-package-core.el
@@ -1849,11 +1849,11 @@ Usage:
 :magic-fallback  Form to be added to `magic-fallback-mode-alist'.
 :interpreter     Form to be added to `interpreter-mode-alist'.
 
-:commands        Define autoloads for commands that will be defined by the
-                 package.  This is useful if the package is being lazily
-                 loaded, and you wish to conditionally call functions in your
+:commands        Define autoloads for commands defined by the package.
+                 This is useful if the package is being lazily loaded,
+                 and you wish to conditionally call functions in your
                  `:init' block that are defined in the package.
-:autoload        Similar to :commands, but it for no-interactive one.
+:autoload        Similar to `:commands', but used for non-interactive functions.
 :hook            Specify hook(s) to attach this package to.
 
 :bind            Bind keys, and define autoloads for the bound commands.
-- 
2.48.1

Eli Zaretskii <[email-masked]> writes:

>> From: Dominik Schrempf <[email-masked]>
>> Date: Thu, 27 Mar 2025 16:01:33 +0100
>>
>> I attach a suggested minor patch of the documentation of `use-package'.
>
> Thanks, see some comments below.
>
>> --- a/lisp/use-package/use-package-core.el
>> +++ b/lisp/use-package/use-package-core.el
>> @@ -1849,11 +1849,11 @@ Usage:
>>  :magic-fallback  Form to be added to `magic-fallback-mode-alist'.
>>  :interpreter     Form to be added to `interpreter-mode-alist'.
>>
>> -:commands        Define autoloads for commands that will be defined by the
>> +:commands        Define autoloads for interactive commands defined by the
>>                   package.  This is useful if the package is being lazily
>> -                 loaded, and you wish to conditionally call functions in your
>> -                 `:init' block that are defined in the package.
>> -:autoload        Similar to :commands, but it for no-interactive one.
>> +                 loaded, and you wish to conditionally call functions in
>> +                 your `:init' block that are defined in the package.
>> +:autoload        Similar to `:commands', but used for non-interactive commands.
>>  :hook            Specify hook(s) to attach this package to.
>>
>>  :bind            Bind keys, and define autoloads for the bound commands.
>
> A command is always interactive.  So saying "interactive commands" is
> a kind-of tautology, and "non-interactive commands" is something that
> doesn't exist in Emacs.
>
> My suggestion is to leave the description of :commands unchanged, and
> modify :autoload to say that its for non-interactive functions.