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: Christopher Dimech
Subject: Re: Prefix Argument and optional argument
Date: Thu, 7 Jul 2022 21:19:43 +0200


> Sent: Friday, July 08, 2022 at 3:12 AM
> From: "Emanuel Berg" <incal@dataswamp.org>
> To: help-gnu-emacs@gnu.org
> Subject: Re: Prefix Argument and optional argument
>
> Stefan Monnier via Users list for the GNU Emacs text editor wrote:
> 
> >> (defun poke (prefix)
> >>   "TODO."
> >>   (interactive "P")
> >> ...)
> >>
> >> gives 
> >>
> >> Warning: misplaced interactive spec: ‘(interactive P)’
> >
> > I don't get this warning here. Instead I get two arnings,
> > one about the fact that `prefix` is not used, and the other
> > about the fact that `...` is not a known variable.
> 
> Do
> 
>   C-u M-x checkdoc-current-buffer RET
> 
> and learn that it also has a docstring problem:
> 
>   Argument ‘prefix’ should appear (as PREFIX) in the doc
>   string
> 
> At the stage when it does nothing, it seems 'poke' has so many
> problems already!

Don't poke! ;)
 
> I also don't get any warnings but the ones you mention,
> 
>   Warning: Unused lexical argument `prefix'
>   Warning: reference to free variable ‘...’
> 
> and that's on
> 
>   GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+
>   Version 3.24.24, cairo version 1.16.0) of 2022-05-28
>   [commit 707124d2b92780b4f21d72c7c62899e074fa8ced]
> 
> (Love the 'ever' command BTW,
>    https://dataswamp.org/~incal/emacs-init/meta.el )
> 
> -- 
> underground experts united
> https://dataswamp.org/~incal
> 
> 
>



reply via email to

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