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 15:45:42 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Christopher Dimech <dimech@gmx.com> writes:

> Have recently seen that compiling
>
> (defun poke (prefix)
>   "TODO."
>   (interactive "P")
> ...)
>
> gives 
>
> Warning: misplaced interactive spec: ‘(interactive P)’

If the order docstring + interactive spec is correct (as above), that
only happens here when the function body is empty (i.e. nothing follows
the interactive spec).  Did that happen in other cases - do you have an
example?

> Is this associated with trying to call the function non-interactively
> or because the prefix (C-u) is not always used when running the function
> interactively?

No.

Michael.



reply via email to

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