Subject: Re: bug#33170: 27.0.50; interactive spec with cl-defgeneric/method

From: Alex Branham <[email-masked]>
Date: Mon, 29 Oct 2018 09:18:53 -0500

On Sat 27 Oct 2018 at 16:49, Stefan Monnier <[email-masked]> wrote:

> AFAIC it's a limitation.  We could support interactive specs, but I'm
> really not convinced it's worth the trouble.  If using 2 functions (one
> generic and one interactive, which calls the generic one) is really
> annoying for some reason, I guess you could use
>
>     (put '<GENERIC> 'interactive-form <FORM>)
>
> but I think this property should be deprecated, so don't tell anyone
> (especially don't tell me) that I even mentioned it to you,

Thanks for the response. Seems like the two-function solution is the way
to go I guess. I do think this should be documented as a limitation
somewhere though. Perhaps a note at the end of that section in the
manual along the lines:

Note that a current limitation of generic functions is that they may not
be interactive. The recommended way of working around this is to define
an interactive function that simply calls the generic function.

That's not strictly true of course since (cl-defgeneric foo ()
(interactive) (message "foo")) works just fine. It's adding methods that
seems to mess it up.

Alex