GNU bug report logs -
#33170
27.0.50; interactive spec with cl-defgeneric/method
Previous Next
Reported by: Alex Branham <alex.branham <at> gmail.com>
Date: Fri, 26 Oct 2018 22:20:03 UTC
Severity: normal
Found in version 27.0.50
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #29 received at 33170 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Sat 27 Oct 2018 at 16:49, Stefan Monnier <monnier <at> IRO.UMontreal.CA> 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
[signature.asc (application/pgp-signature, inline)]
This bug report was last modified 6 years and 260 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.