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

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

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


From: Alex Branham
Subject: bug#33170: 27.0.50; interactive spec with cl-defgeneric/method
Date: Mon, 29 Oct 2018 09:18:53 -0500
User-agent: mu4e 1.1.0; emacs 27.0.50

On Sat 27 Oct 2018 at 16:49, Stefan Monnier <address@hidden> 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

Attachment: signature.asc
Description: PGP signature


reply via email to

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