all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Pierre Lorenzon <devel@pollock-nageoire.net>
To: help-gnu-emacs@gnu.org
Subject: Re: cl-generic
Date: Wed, 29 Apr 2015 19:58:41 +0200 (CEST)	[thread overview]
Message-ID: <20150429.195841.2172902853691227573.devel@pollock-nageoire.net> (raw)
In-Reply-To: <jwvwq0yqxtq.fsf-monnier+gnu.emacs.help@gnu.org>


Hi Stefan


thanks for your answer.



From: Stefan Monnier <monnier@iro.umontreal.ca>
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



  reply	other threads:[~2015-04-29 17:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.1284.1429634199.904.help-gnu-emacs@gnu.org>
2015-04-26 23:33 ` cl-generic Stefan Monnier
2015-04-29 17:58   ` Pierre Lorenzon [this message]
2015-04-29 22:27     ` cl-generic Stefan Monnier
2015-04-21 16:27 cl-generic Pierre Lorenzon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150429.195841.2172902853691227573.devel@pollock-nageoire.net \
    --to=devel@pollock-nageoire.net \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.