From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alex Branham Newsgroups: gmane.emacs.bugs Subject: bug#33170: 27.0.50; interactive spec with cl-defgeneric/method Date: Sat, 27 Oct 2018 07:40:11 -0500 Message-ID: <87k1m3lg0k.fsf@gmail.com> References: <87efccmjun.fsf@gmail.com> <83lg6jop6b.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Trace: blaine.gmane.org 1540643951 3981 195.159.176.226 (27 Oct 2018 12:39:11 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 27 Oct 2018 12:39:11 +0000 (UTC) User-Agent: mu4e 1.1.0; emacs 27.0.50 Cc: 33170@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Oct 27 14:39:07 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gGNrt-0000vM-Mg for geb-bug-gnu-emacs@m.gmane.org; Sat, 27 Oct 2018 14:39:05 +0200 Original-Received: from localhost ([::1]:36477 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gGNu0-0008S6-6y for geb-bug-gnu-emacs@m.gmane.org; Sat, 27 Oct 2018 08:41:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57082) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gGNtp-0008Ro-Uc for bug-gnu-emacs@gnu.org; Sat, 27 Oct 2018 08:41:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gGNtl-0007St-S1 for bug-gnu-emacs@gnu.org; Sat, 27 Oct 2018 08:41:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:40445) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gGNtl-0007Sl-MJ for bug-gnu-emacs@gnu.org; Sat, 27 Oct 2018 08:41:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gGNtl-0003kN-Id for bug-gnu-emacs@gnu.org; Sat, 27 Oct 2018 08:41:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alex Branham Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 27 Oct 2018 12:41:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33170 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 33170-submit@debbugs.gnu.org id=B33170.154064402314345 (code B ref 33170); Sat, 27 Oct 2018 12:41:01 +0000 Original-Received: (at 33170) by debbugs.gnu.org; 27 Oct 2018 12:40:23 +0000 Original-Received: from localhost ([127.0.0.1]:44703 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gGNt9-0003jJ-5g for submit@debbugs.gnu.org; Sat, 27 Oct 2018 08:40:23 -0400 Original-Received: from mail-oi1-f179.google.com ([209.85.167.179]:43516) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gGNt7-0003j3-3L for 33170@debbugs.gnu.org; Sat, 27 Oct 2018 08:40:21 -0400 Original-Received: by mail-oi1-f179.google.com with SMTP id j202-v6so2878000oih.10 for <33170@debbugs.gnu.org>; Sat, 27 Oct 2018 05:40:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=mPnJ3bISNcXWE5tfXgoJaGuWmQAtn6gplQe/8OJAT44=; b=r+ORJaQv15rPv9MjvqU9FILJmueUB7wa5NjQ4XT2d17eMBuZZIrnFBubdpk0xKbpbn 5fxYDyH+Sl8uKNslTDNxIpwrHD4+sX0csyE6LNVGYaUoNvH2u255Lriepaj0j3D+Sah4 gOa5x6wbGiLpiaNfe+SADCPEhOxvhZcIN3nlXkP5eK+6BuTqhnvQy/k2BIMxPN1DX1ne Y9PxIS8OPT3XkeTpB/ZMvwgW8QIUNvs+5VvmCCIiU70cAJRgsHt5Pj/ROfHNs75YdmAj 42/5GBGHGh2sZKjK8GHPBXqIJwqxSRwel7DDMa1f+dFf+izTU/8+81DQ/QjO8+fRqBts 7X7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=mPnJ3bISNcXWE5tfXgoJaGuWmQAtn6gplQe/8OJAT44=; b=gQlq3e5CCMPoCdDrT36FjwZ5iUOitnRop3+UdtVBqpc6XSptJVYtRha6bJ15Av0Yux KiI9yxLmKudi7539cACqqs3qYURJuemwJblHgTLKrxAoPZmuC59mT+IpYHakaczaQpcj P7TS8K/SQ1V/pczq0bfgJWZmSb4ssMaPcor98sULWb94PesGHe7H72xD3kpLt4hZ2qQX RKNiej4YTg4Gc6GXJn7okwdHT8vk1wd7plpuhPfud9AHPhSO6MdrQFKlwEfKjeWbkEZv 3a/YDMx70LPO40w6QriYMxG0f2TR+5LkCFHAxHvCYOvz5CAHSQf/h8pgtueGM/NgabYn jVww== X-Gm-Message-State: AGRZ1gJH790Ol/jRufiL/o1JG/TZVvukgh8rzVEJ3CU11AS2hjLgaw96 SJOoyew/8vU/trX8Q3GoNosdD71g X-Google-Smtp-Source: AJdET5dYamXh4BinNuCAXoJNby61rDcpwAj062W5AKjBkP7wDB8FWKf8LqIT/HYA8Ym73BHVhyubFw== X-Received: by 2002:aca:1218:: with SMTP id 24-v6mr4193008ois.246.1540644014917; Sat, 27 Oct 2018 05:40:14 -0700 (PDT) Original-Received: from earth (cpe-70-114-192-208.austin.res.rr.com. [70.114.192.208]) by smtp.gmail.com with ESMTPSA id c186-v6sm5071007oih.28.2018.10.27.05.40.13 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 27 Oct 2018 05:40:13 -0700 (PDT) In-reply-to: <83lg6jop6b.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:151674 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Sat 27 Oct 2018 at 01:54, Eli Zaretskii wrote: >> From: Alex Branham >> Date: Fri, 26 Oct 2018 17:19:44 -0500 >>=20 >> I'm struggling to understand how to make functions defined with >> cl-defgeneric interactive: >>=20 >> (require 'cl-lib) >>=20 >> (cl-defgeneric my/test () >> (interactive) >> (message "generic")) >>=20 >> If you evaluate that you can do M-x my/test, as expected. However, as >> soon as you evaluate this: >>=20 >> (cl-defgeneric my/test (&context (major-mode emacs-lisp-mode)) >> (interactive) >> (message "method")) >>=20 >> M-x my/test no longer works. > > '&context' is documented only as part of cl-defmethod, so why are you > trying to use it with cl-defgeneric? Sorry, that was a typo. The same thing happens if you use defmethod: (require 'cl-lib) (cl-defgeneric my/test () (interactive) (message "generic")) here, M-x my/test works (cl-defmethod my/test (&context (major-mode emacs-lisp-mode)) (interactive) (message "method")) Here, M-x my/test does not work. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEeEJ4XAMgliXNXicpHkInolPpmscFAlvUXKsACgkQHkInolPp mseeSwf/VRV97kWIlVkUDeffJKnr1Kg7QF7EiPtnKPG7FlZaqO8dUNvPcFwOrk+z xsK8NPSGNiZIMTfm0RuJgn9wYJ71DZHtTwGdABVPeEvEHCiCFXjFNEUfd+oYehYZ Y66XrjVJbOZTJU6JzlNPwlzNjMKlXiRHgQ1fY290jXi4Jj8NIgBeKQ9CMNCSXV0+ dGfb4O4JwhbhE2gQfx7ag1Nh1+KHLXp3KPl8jAZZrKS0DtFp6YI3fqwxuij6B03C HZwiqPiQYREUH0ay4uolYu6b27HOf5TScFG8ogfvjBLCDzPduzG1GduCSqKSir4Z uTf2vNgGgadOB0zj1enjn+CuPnkRXA== =zmDP -----END PGP SIGNATURE----- --=-=-=--