Subject: Re: bug#66410: 28.2; Symbol’s function definition is void: command-query
From: Stefan Kangas <[email-masked]>
To: Stephen Berman <[email-masked]>, Paul Stansell <[email-masked]>
Cc: [email-masked]
Date: Sun, 8 Oct 2023 20:17:39 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

Stephen Berman <[email-masked]> writes:

> (defun command-query (command query &optional verbose)
>   "Make executing COMMAND issue QUERY to the user.
> This will, by default, use `y-or-n-p', but if VERBOSE,
> `yes-or-no-p' is used instead."
>   (put command 'disabled
>        (list 'query (not (not verbose)) query)))
>
> so you could add it to your init file before the above use of it.  (But
> if you later update to Emacs 29.1 or later, you should then remove the
> definition from your init file.)

I'd use this:

(when (< emacs-major-version 29)
  (defun command-query (command query &optional verbose)
    "Make executing COMMAND issue QUERY to the user.
This will, by default, use `y-or-n-p', but if VERBOSE,
`yes-or-no-p' is used instead."
    (put command 'disabled
         (list 'query (not (not verbose)) query))))

I don't see a bug here, so I'm closing this now.  Thanks.