From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alexander Shukaev Newsgroups: gmane.emacs.help Subject: Re: Macro Expansion Inconsistency Date: Wed, 17 Dec 2014 17:01:51 +0100 Message-ID: References: <87r3vyegmt.fsf@yahoo.fr> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1418832138 17278 80.91.229.3 (17 Dec 2014 16:02:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 17 Dec 2014 16:02:18 +0000 (UTC) Cc: help-gnu-emacs To: Barry Margolin Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Dec 17 17:02:12 2014 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 1Y1H3C-0002l8-Ec for geh-help-gnu-emacs@m.gmane.org; Wed, 17 Dec 2014 17:02:10 +0100 Original-Received: from localhost ([::1]:50418 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y1H3B-000173-P9 for geh-help-gnu-emacs@m.gmane.org; Wed, 17 Dec 2014 11:02:09 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46816) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y1H30-00016u-Sz for help-gnu-emacs@gnu.org; Wed, 17 Dec 2014 11:02:00 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y1H2v-0007vQ-03 for help-gnu-emacs@gnu.org; Wed, 17 Dec 2014 11:01:58 -0500 Original-Received: from mail-la0-x236.google.com ([2a00:1450:4010:c03::236]:60543) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y1H2u-0007vL-N8 for help-gnu-emacs@gnu.org; Wed, 17 Dec 2014 11:01:52 -0500 Original-Received: by mail-la0-f54.google.com with SMTP id pv20so13053432lab.41 for ; Wed, 17 Dec 2014 08:01:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=cyKvOn/9eWuo9qePgz/ibQlZ0BVm0xn1WcVZfoJoyrg=; b=qkf0iw4IhRDSjfFRYD8sZj8/VKK6kOVOn26NxuQS46K6uXeXvbUzb0OG1iAneFtu2G z5T0uDidQNgs1hTiayfQ7fF6dE1MugFLbRNUQP+8AgTkbKP2eljozvxdLuhbBw2cskXV z8X2iciXXJl4/5sl9aKe0USsKV2dlG41GLd5TEdENSPcCwIyuZUWImY6Vf/vFvdOr+bW TcSJCOez4mhexz6+IPPp/hSgK+RtOpTefLp4ts4Bvui2yUjFApCyqr1OA83ACUEXB2CA fQ71o/zH15Y2jWapvGxTL31/TmYXmuZmeIB10OYlO+uwOEbEkGpxNF1VLN22YbHPUDnw uf2w== X-Received: by 10.112.235.67 with SMTP id uk3mr15213988lbc.48.1418832111948; Wed, 17 Dec 2014 08:01:51 -0800 (PST) Original-Received: by 10.112.123.235 with HTTP; Wed, 17 Dec 2014 08:01:51 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c03::236 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 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:101643 Archived-At: > > Not just "probably the best" -- this is the ONLY way to go in macros. > The whole point of macros is to produce new code to be evaluated in > place of the original code. > > The important thing to remember about macros is that they run when > you're COMPILING the code, not when you run it. These may be > approximately the same time if you evaluate the calling code (e.g. by > typing it into the *scratch* buffer, loading the source file, M-x > eval-region). This is why calling eval seems to work when you're testing > the macro interactively. > > But if you byte-compile the file, it will be run then, not when you > later load the .elc file. This will usually be a totally different Emacs > session, so it should be obvious why the results of calling eval won't > be available then. =E2=80=8BNice explanation, it indeed does make sense. Thank you.=E2=80=8B