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

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

bug#66410: 28.2; Symbol’s function definition is void: command-query


From: Stephen Berman
Subject: bug#66410: 28.2; Symbol’s function definition is void: command-query
Date: Sun, 08 Oct 2023 21:49:16 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

On Sun, 8 Oct 2023 17:29:51 +0100 Paul Stansell <paulstansell@gmail.com> wrote:

> Hello,
>
> The following command is given as an example on
> https://www.gnu.org/software/emacs/manual/html_node/emacs/Disabling.html

This online manual is for Emacs version 29.1 (as you can see if you
click the "Contents" link at the top of that page),

>   (command-query
>    'end-of-buffer
>    "Do you really want to go to the end of the buffer?")

and `command-query' was first added to Emacs in version 29.1,

> However, when I try it in my emacs init.el get this error
>
>   load-with-code-conversion: Symbol's function definition is void: 
> command-query
>
> Thanks,
>
> Paul
>
> In GNU Emacs 28.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.37, cairo 
> version 1.16.0)
>  of 2023-03-16, modified by Debian built on lcy02-amd64-035

but you are evidently using Emacs 28.2, that's why it doesn't know
`command-query'.  But the definition is short:

(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.)

Steve Berman





reply via email to

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