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

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

[debbugs-tracker] bug#33170: closed (27.0.50; interactive spec with cl-d


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#33170: closed (27.0.50; interactive spec with cl-defgeneric/method)
Date: Tue, 30 Oct 2018 10:16:01 +0000

Your message dated Tue, 30 Oct 2018 12:15:37 +0200
with message-id <address@hidden>
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
address@hidden)


-- 
33170: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=33170
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 27.0.50; interactive spec with cl-defgeneric/method Date: Fri, 26 Oct 2018 17:19:44 -0500 User-agent: mu4e 1.1.0; emacs 27.0.50
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

Attachment: signature.asc
Description: PGP signature


--- End Message ---
--- Begin Message --- Subject: Re: bug#33170: 27.0.50; interactive spec with cl-defgeneric/method Date: Tue, 30 Oct 2018 12:15:37 +0200
> From: Alex Branham <address@hidden>
> Cc: Eli Zaretskii <address@hidden>, address@hidden
> Date: Mon, 29 Oct 2018 09:18:53 -0500
> 
> 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.

Done.


--- End Message ---

reply via email to

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