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
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Tue, 30 Oct 2018 12:15:37 +0200
with message-id <838t2floza.fsf <at> gnu.org>
and subject line Re: bug#33170: 27.0.50; interactive spec with cl-defgeneric/method
has caused the debbugs.gnu.org bug report #33170,
regarding 27.0.50; interactive spec with cl-defgeneric/method
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
33170: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=33170
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
[Message part 3 (text/plain, inline)]
I'm struggling to understand how to make functions defined with
cl-defgeneric interactive:
(require 'cl-lib)
(cl-defgeneric my/test ()
(interactive)
(message "generic"))
If you evaluate that you can do M-x my/test, as expected. However, as
soon as you evaluate this:
(cl-defgeneric my/test (&context (major-mode emacs-lisp-mode))
(interactive)
(message "method"))
M-x my/test no longer works.
Is this a bug or am I misunderstanding how this works?
Thanks,
Alex
[signature.asc (application/pgp-signature, inline)]
[Message part 5 (message/rfc822, inline)]
> From: Alex Branham <alex.branham <at> gmail.com>
> Cc: Eli Zaretskii <eliz <at> gnu.org>, 33170 <at> debbugs.gnu.org
> Date: Mon, 29 Oct 2018 09:18:53 -0500
>
> 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.
Done.
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.