From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Pierre Lorenzon Newsgroups: gmane.emacs.help Subject: Re: cl-generic Date: Wed, 29 Apr 2015 19:58:41 +0200 (CEST) Message-ID: <20150429.195841.2172902853691227573.devel@pollock-nageoire.net> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1430326761 7111 80.91.229.3 (29 Apr 2015 16:59:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 29 Apr 2015 16:59:21 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Apr 29 18:59:12 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 1YnVKJ-0007Kk-RS for geh-help-gnu-emacs@m.gmane.org; Wed, 29 Apr 2015 18:59:11 +0200 Original-Received: from localhost ([::1]:40154 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YnVKJ-0003Ew-7j for geh-help-gnu-emacs@m.gmane.org; Wed, 29 Apr 2015 12:59:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36789) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YnVK6-0003Ep-5m for help-gnu-emacs@gnu.org; Wed, 29 Apr 2015 12:59:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YnVK1-00006H-6D for help-gnu-emacs@gnu.org; Wed, 29 Apr 2015 12:58:58 -0400 Original-Received: from smtp05.smtpout.orange.fr ([80.12.242.127]:37644 helo=smtp.smtpout.orange.fr) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YnVK0-0008WB-UZ for help-gnu-emacs@gnu.org; Wed, 29 Apr 2015 12:58:53 -0400 Original-Received: from localhost ([82.123.30.187]) by mwinf5d52 with ME id Msyq1q00C42Dy4203syqvJ; Wed, 29 Apr 2015 18:58:50 +0200 X-ME-Helo: localhost X-ME-Date: Wed, 29 Apr 2015 18:58:50 +0200 X-ME-IP: 82.123.30.187 X-Mailer: Mew version 6.5 on Emacs 25.0.50 / Mule 6.0 (HANACHIRUSATO) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 80.12.242.127 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:104076 Archived-At: Hi Stefan thanks for your answer. From: Stefan Monnier Subject: Re: cl-generic Date: Sun, 26 Apr 2015 19:33:03 -0400 >> 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. For me it was in fact not really a bug but much more an information about what effect will really have the byte-compile command. > >> (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). OK ! > > You'd have to use > > (eval (byte-compile '(cl-defmethod mymethod ....))) I'll do that ! Thanks Again > > to byte-compile this particular method. > > > Stefan