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

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

Re: Prefix Argument and optional argument


From: Michael Heerdegen
Subject: Re: Prefix Argument and optional argument
Date: Thu, 07 Jul 2022 12:56:37 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

carlmarcos--- via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org> writes:

> Why is it that a warning is shown, what is the problem with it.

It warns about transposed interactive spec and docstring - a programmer
error.

> Why using &optional is ok, but not ok without it?

Non-interactive calls don't come with a prefix arg.  When you call your
function from Lisp, it's often not useful to provide something for that
argument so it makes no sense to make it mandatory.  You can make it
mandatory if the argument also has a meaning for calls from ELisp.

Michael.




reply via email to

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