From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Helmut Eller Newsgroups: gmane.emacs.bugs Subject: bug#42691: 28.0.50; eval-and-compile Date: Mon, 03 Aug 2020 12:27:15 +0200 Message-ID: References: <87bljsqdqq.fsf@igel.home> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31132"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 42691@debbugs.gnu.org To: Andreas Schwab Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Aug 03 12:28:09 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k2XhR-0007yQ-Eg for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 03 Aug 2020 12:28:09 +0200 Original-Received: from localhost ([::1]:35840 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k2XhQ-0002Uu-8s for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 03 Aug 2020 06:28:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33924) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k2XhK-0002Un-HZ for bug-gnu-emacs@gnu.org; Mon, 03 Aug 2020 06:28:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:32861) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k2XhK-00079S-7q for bug-gnu-emacs@gnu.org; Mon, 03 Aug 2020 06:28:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1k2XhK-0004oi-11 for bug-gnu-emacs@gnu.org; Mon, 03 Aug 2020 06:28:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Helmut Eller Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 03 Aug 2020 10:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42691 X-GNU-PR-Package: emacs Original-Received: via spool by 42691-submit@debbugs.gnu.org id=B42691.159645044518473 (code B ref 42691); Mon, 03 Aug 2020 10:28:01 +0000 Original-Received: (at 42691) by debbugs.gnu.org; 3 Aug 2020 10:27:25 +0000 Original-Received: from localhost ([127.0.0.1]:44407 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k2Xgj-0004ns-HE for submit@debbugs.gnu.org; Mon, 03 Aug 2020 06:27:25 -0400 Original-Received: from mail-ej1-f44.google.com ([209.85.218.44]:34669) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k2Xgh-0004nd-4k for 42691@debbugs.gnu.org; Mon, 03 Aug 2020 06:27:23 -0400 Original-Received: by mail-ej1-f44.google.com with SMTP id o23so10603131ejr.1 for <42691@debbugs.gnu.org>; Mon, 03 Aug 2020 03:27:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=TBwdMipy0p37r8ptyZQUxB2wTUgnzAnNHcPN/FUE+ZU=; b=q6Hiv9JmiMuqRUurS/vDeQRg4PwLLKTFhcFsUfJDgiVn1btIydinM44F1tkTTeUi/r NV1pNPaqC0OXXFvvuOxEgmmEoejNd8lTsXdQfUtJ8X+lcueXRXtjzWIfaMnfDnX6kzL9 RW5BHXyW/Rj33VaVjKxzZWWDKe+rkXbKNgUa5VuBIWeagt6SiQIusxLHM4RWVY6K3FH2 n7lZ0CEbyjp6rZRmuKLuULFkjlN/B1lRSGVVWkUl4q4EPZS64HeQ6N4oPLZZBDyAbxRu ObSU9jZLpDae63NaHSi8FiuhHfsx71PhvZ8LxsDOIU8Uu+HJVswoXHYVu8izK10ON/sP GXmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=TBwdMipy0p37r8ptyZQUxB2wTUgnzAnNHcPN/FUE+ZU=; b=c5JjAOm8fU0Zdz0SCvGEzmS74m8HFnSol6Yt3qrNwO2Yz4vzLbRyAxYyMNgv9/NJt9 TfmrOv9ZQlZoGqNihUGkGnPAON/fsHP+3iwVrUWRLasM6yHw5ZItUKnw4T7bbFS8deTc ltMQkuFTmJmgI/G6cdZbXTPBe228kOwyV5O7BLEMe8ppMNL0YqGh8tXk7k3++Lt/Yw4X fVs0WqhMZe87g2ADEofMZ2JNNXzaGop/9NSRqZaPHMzggYzR4IQAj9hYEvTGGfFD2UjB R5Abq2Nctnqf/0++arNOmgMXUdl6vjE/Cxk0RiyaihQkvVWZOYSzfsq9iLXgali8ASzf fJzw== X-Gm-Message-State: AOAM53094g/KFsNvaSLBsHICQDbsQoDN0AVAdZ/ACto/ij/PeGwf10Ub YvlxRNBrtQ+yPAcVwCiWFCVmtwDz X-Google-Smtp-Source: ABdhPJzwByveJYRx7YCSrYPC693G7kfRjKDvazE86ARN8dWY7bh7K+tgJaL2Tdt8G7vUqmBwfadbxA== X-Received: by 2002:a17:906:e50:: with SMTP id q16mr4512403eji.155.1596450436766; Mon, 03 Aug 2020 03:27:16 -0700 (PDT) Original-Received: from caladan ([89.107.106.10]) by smtp.gmail.com with ESMTPSA id n25sm1342526ejr.21.2020.08.03.03.27.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Aug 2020 03:27:16 -0700 (PDT) In-Reply-To: <87bljsqdqq.fsf@igel.home> (Andreas Schwab's message of "Mon, 03 Aug 2020 11:29:17 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:183931 Archived-At: On Mon, Aug 03 2020, Andreas Schwab wrote: > On Aug 03 2020, Helmut Eller wrote: > >> Compiling this example: >> >> (require 'cl-lib) >> (cl-macrolet ((foo () '123)) >> (eval-and-compile (foo))) >> >> with >> >> emacs -Q --batch -f batch-byte-compile bug.el >> >> prints: >> >> In toplevel form: >> bug.el:2:1: Error: Symbol=E2=80=99s function definition is void: foo >> >> I think when compiling eval-and-compile the macro-environment is not >> passed along properly. > > Only the body of eval-and-compile is evaluated at that point. If you > want to modify the environment of the evaluation, you need to move that > modification inside the eval-and-compile form. Are you saying this is not a bug in eval-and-compile? The docstring of eval-and-compile says eval-and-compile is like progn, except that the body it is evaluated at compile-time too. If it is supposed to work like progn, then the environment should be defined as for progn. Helmut