From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gerd =?UTF-8?Q?M=C3=B6llmann?= Newsgroups: gmane.emacs.bugs Subject: bug#65620: void function edebug-after Date: Thu, 31 Aug 2023 10:02:18 +0200 Message-ID: References: <87ledsku08.fsf@web.de> 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="31182"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Alan Mackenzie , 65620@debbugs.gnu.org To: Michael Heerdegen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Aug 31 10:04:26 2023 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 1qbcfB-0007pD-Mn for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 31 Aug 2023 10:04:25 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qbceu-0000rk-P6; Thu, 31 Aug 2023 04:04:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qbceh-0000oa-BA for bug-gnu-emacs@gnu.org; Thu, 31 Aug 2023 04:03:57 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qbceg-0003iA-AK for bug-gnu-emacs@gnu.org; Thu, 31 Aug 2023 04:03:54 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qbceo-0000ad-1S for bug-gnu-emacs@gnu.org; Thu, 31 Aug 2023 04:04:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Gerd =?UTF-8?Q?M=C3=B6llmann?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 31 Aug 2023 08:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65620 X-GNU-PR-Package: emacs Original-Received: via spool by 65620-submit@debbugs.gnu.org id=B65620.16934689972213 (code B ref 65620); Thu, 31 Aug 2023 08:04:02 +0000 Original-Received: (at 65620) by debbugs.gnu.org; 31 Aug 2023 08:03:17 +0000 Original-Received: from localhost ([127.0.0.1]:54806 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qbce5-0000Zc-E4 for submit@debbugs.gnu.org; Thu, 31 Aug 2023 04:03:17 -0400 Original-Received: from mail-ej1-x62d.google.com ([2a00:1450:4864:20::62d]:52578) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qbce1-0000ZG-DC for 65620@debbugs.gnu.org; Thu, 31 Aug 2023 04:03:16 -0400 Original-Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-991c786369cso55823466b.1 for <65620@debbugs.gnu.org>; Thu, 31 Aug 2023 01:03:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693468979; x=1694073779; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=a8H/Qxet5Abn9WhxB3AcYREdnYRLqoZLEYWxwyOREao=; b=cSmMg7l/X+5Fv7XsCLUYyYCVQzb+63veqVJihEMDekGy4tvqWmfXKaQ9LUocwSn8oV Q8H7oCSg0YPLiRDKVNIjyRu20qjBiIMK8jrLpY5vj7Va9J5ohf8sOOtTPV+Pt7aaNPEM sMVU7F8cak97WBQVcnSMRQvnfzerpNi4W98Xn2JYvBImPO992m+ADlnMCsHmjRxKxzsu lIXwyL7ktUm7ZUkDGn/tZFL+8uo1dtGrs21ItJxADpumrNXYNs36R0yPBBGp5GjUWHu1 ziMWAN//CZ1rNLC4+DSDgkbNFIpYNOiHO56cDIXu2wQhG0Tb+40tD8dsQzyMbt2O7sZd g6aQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693468979; x=1694073779; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=a8H/Qxet5Abn9WhxB3AcYREdnYRLqoZLEYWxwyOREao=; b=G/HDjNfeQtqrlodQSXgtxoJnAxlzmLPqLQTNTDojJpFJAgrppBj9RoLLnfxPHgidrr h0ZzK5BHrj0KdctE8reCtz+rooN4jIeAdLO8/1UD7IQE6SVVdDhle/qxKkJYv0qIFUu0 lQ8OqIDJe50bNOkPdKMgUA4sZ8/R8C2nWnvCMtlTaKfai/IqxxhOcMKk0UN1MM6GbtZv qmRF+TtHnxHJMGCX+7WB6SHRqkh0YZrlb1I9Srg7loTJq5BRfQ8FSuA2wMJqrBW4MaoQ eqZeQ402TBCYg6/Ogk3k/N/HxmrQdb/Xlgu9gQtMXmJSDfLJD7NX9yNvlaryxFUEOOgu 7FzA== X-Gm-Message-State: AOJu0YxT1KJUR9ucW51jDqHOgxcq9g9nupuOrMdt/Y5BumOIBcNEBjO+ Wo12lTJvznP0OwHs3/m+JOSzrE1+ZlJTFAxh X-Google-Smtp-Source: AGHT+IH8CeumLHbSGv/22JEd4ax2Hx2mywCPOowBarKRUXn7l3e/qTo8B0tYNC4AbN1PRX10Rgdlqw== X-Received: by 2002:a17:906:76c8:b0:9a1:d67c:b4eb with SMTP id q8-20020a17090676c800b009a1d67cb4ebmr3329665ejn.48.1693468978947; Thu, 31 Aug 2023 01:02:58 -0700 (PDT) Original-Received: from Mini.fritz.box (pd9e36a8f.dip0.t-ipconnect.de. [217.227.106.143]) by smtp.gmail.com with ESMTPSA id dt22-20020a170906b79600b0099d959f9536sm479665ejb.12.2023.08.31.01.02.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 31 Aug 2023 01:02:43 -0700 (PDT) In-Reply-To: ("Gerd =?UTF-8?Q?M=C3=B6llmann?="'s message of "Thu, 31 Aug 2023 09:55:18 +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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:268797 Archived-At: Gerd M=C3=B6llmann writes: > Michael Heerdegen writes: > >> Alan Mackenzie writes: >> >>> (defmacro hash-if (condition then-form &rest else-forms) >>> "A conditional compilation macro analogous to C's #if. >>> Evaluate CONDITION at macro-expansion time. If it is non-nil, >>> expand the macro to THEN-FORM. Otherwise expand it to ELSE-FORMS >>> enclosed in a `progn' form. ELSE-FORMS may be empty." >>> (declare (indent 2) >>> (debug (form sexp &rest sexp))) >>> (if (eval condition lexical-binding) >>> then-form >>> (cons 'progn else-forms))) >> >> Dunno if someone is able to fix this (I'm not). Until then using >> `def-form` `or `sexp` instead of `form` works in a better way (the >> former edebugs CONDITION when instrumenting, the latter would omit >> edebugging the CONDITION entirely). >> >> Anyway, the key point in the above example is that macroexpanding (while >> instrumenting) combined with the `eval' call seems to lead to the >> evaluation of instrumented code outside of an Edebug session when >> CONDITION is instrumented using `form`. `eval-when-compile' uses >> `def-form` for example - I guess using `form` in this case doesn't work >> as one might expect. > > I think what's happening here is like this: > > By using 'form' for condition, we're telling edebug to instruments it. > That is, the argument eval sees when foo is instrumented is whatever Sorry, "sees" is midleading: eval has as argument ...