From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.help Subject: Re: cl-generic Date: Sun, 26 Apr 2015 19:33:03 -0400 Organization: A noiseless patient Spider Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1430091320 13182 80.91.229.3 (26 Apr 2015 23:35:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 26 Apr 2015 23:35:20 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Apr 27 01:35:19 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YmW4z-0001hh-W8 for geh-help-gnu-emacs@m.gmane.org; Mon, 27 Apr 2015 01:35:18 +0200 Original-Received: from localhost ([::1]:52530 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YmW4z-0008PI-3r for geh-help-gnu-emacs@m.gmane.org; Sun, 26 Apr 2015 19:35:17 -0400 Original-Path: usenet.stanford.edu!news.kjsl.com!feeder.erje.net!1.eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 31 Injection-Info: mx02.eternal-september.org; posting-host="431302481d601a9704ca68d6c9190d74"; logging-data="7789"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18zf+lg9OB4sJ6zRnnAfC9r" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) Cancel-Lock: sha1:PrJE+spzteYbu/+NGlUeMgM7uVs= sha1:XOBYK+AppU9DtT1+euYglI19nZE= Original-Xref: usenet.stanford.edu gnu.emacs.help:211732 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:104014 Archived-At: > With the old functions I was able to give a byte compile form > as method body but it does not seem to be possibl with > cl-defmethod. One might always define a method : Of course eieio-defmethod and eieio--defmethod are still available, as backward compatibility, and otherwise you can use the new cl-generic-define-method. But in any case, such issues should be reported via M-x report-emacs-bug rather than in gnu.emacs.help. > (cl-defmethod mymethod .... and then execute (byte-compile > 'mymethod) but I wonder if doing that the method body is really > byte compiled. No, that won't byte compile the method: (byte-compile 'mymethod) will only try to compile `mymethod' which is a generic function (which dispatches to the various possible methods) and is already byte-compiled anyway (I could imagine extending `byte-compile' so that it understands the internal structure of generic functions and tries to byte-compile all the methods when applied to a generic function, but currently it doesn't do that). You'd have to use (eval (byte-compile '(cl-defmethod mymethod ....))) to byte-compile this particular method. Stefan