From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: Rationalising c[ad]\{2,5\}r. Date: Thu, 12 Mar 2015 08:56:07 +0000 Message-ID: <20150312085607.GA2625@acm.fritz.box> References: <20150311214324.GA2952@acm.fritz.box> <87zj7jb2p2.fsf@zigzag.favinet> <20150311230054.GB2952@acm.fritz.box> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1426150615 32604 80.91.229.3 (12 Mar 2015 08:56:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 12 Mar 2015 08:56:55 +0000 (UTC) Cc: emacs-devel To: Artur Malabarba Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Mar 12 09:56:46 2015 Return-path: Envelope-to: ged-emacs-devel@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 1YVyv8-0007k5-B3 for ged-emacs-devel@m.gmane.org; Thu, 12 Mar 2015 09:56:46 +0100 Original-Received: from localhost ([::1]:58663 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVyv2-0006nV-Lh for ged-emacs-devel@m.gmane.org; Thu, 12 Mar 2015 04:56:40 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39825) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVyuz-0006nO-OO for emacs-devel@gnu.org; Thu, 12 Mar 2015 04:56:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YVyux-0003a9-3D for emacs-devel@gnu.org; Thu, 12 Mar 2015 04:56:37 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:55676 helo=mail.muc.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVyuw-0003Zt-Pu for emacs-devel@gnu.org; Thu, 12 Mar 2015 04:56:35 -0400 Original-Received: (qmail 73991 invoked by uid 3782); 12 Mar 2015 08:56:31 -0000 Original-Received: from acm.muc.de (pD95188B5.dip0.t-ipconnect.de [217.81.136.181]) by colin.muc.de (tmda-ofmipd) with ESMTP; Thu, 12 Mar 2015 09:56:30 +0100 Original-Received: (qmail 2712 invoked by uid 1000); 12 Mar 2015 08:56:07 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x X-Received-From: 193.149.48.1 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:183804 Archived-At: Hello, Artur. On Wed, Mar 11, 2015 at 09:52:07PM -0300, Artur Malabarba wrote: > > Just one thing, though, since `number-sequence' is also defined in > > subr.el, I'd have to wrap it in `eval-and-compile' to be able to use it > > in my macros. > I don't understand. Why is that? Normally, during byte compilation, the newly compiled defuns and defvars are simply written to the output file. They cannot be executed/accessed until that file.elc is later loaded. This would be a problem for my macro `gen-cXXr-all', which wants to _run_ `number-sequence' whilst subr.el is being compiled. The solution is `eval-and-compile', which instructs the byte compiler both to write the compiled `number-sequence' to the output file and to evaluate it, so that it is available for use later during the compilation. I don't think this is particularly well described in the Elisp manual, particularly with the sentence "Most uses of `eval-and-compile' are fairly sophisticated.", which does sound a little patronising. -- Alan Mackenzie (Nuremberg, Germany).