From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.bugs Subject: bug#65620: void function edebug-after Date: Thu, 31 Aug 2023 01:09:11 +0200 Message-ID: <87ledsku08.fsf@web.de> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26235"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 65620@debbugs.gnu.org To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Aug 31 01:10:22 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 1qbUKM-0006cP-Cc for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 31 Aug 2023 01:10:22 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qbUJv-0002ai-Mm; Wed, 30 Aug 2023 19:09:55 -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 1qbUJv-0002aY-19 for bug-gnu-emacs@gnu.org; Wed, 30 Aug 2023 19:09:55 -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 1qbUJu-0005LR-Pl for bug-gnu-emacs@gnu.org; Wed, 30 Aug 2023 19:09:54 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qbUK2-0000jL-9Q for bug-gnu-emacs@gnu.org; Wed, 30 Aug 2023 19:10:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Heerdegen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 30 Aug 2023 23:10: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.16934369732766 (code B ref 65620); Wed, 30 Aug 2023 23:10:02 +0000 Original-Received: (at 65620) by debbugs.gnu.org; 30 Aug 2023 23:09:33 +0000 Original-Received: from localhost ([127.0.0.1]:54283 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qbUJZ-0000iX-2f for submit@debbugs.gnu.org; Wed, 30 Aug 2023 19:09:33 -0400 Original-Received: from mout.web.de ([212.227.17.11]:42235) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qbUJU-0000iH-2D for 65620@debbugs.gnu.org; Wed, 30 Aug 2023 19:09:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273; t=1693436952; x=1694041752; i=michael_heerdegen@web.de; bh=3OYnHuf7+9RG84cHIV/42FkvWekb59+CDu8TbD9deZo=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date; b=KzNDSBrQJnqn1KIpNHuPGqpZO0NHYwrb+9GNPtbrd1dvuec/WtlvRZ/p97gLS1Iazb5GW1u KIb0X5ene7tjcyAZGM1kgSZRiIHA0qDVhlZrB68yf58UJFlLPKCcLOdOe0SaFjxYBmILwUu8n 8pvkzqowA931i/I+Z6m/unS/yAQBe7w/7rASTWCd+T6CHEkC2CCIoFv1VkTgHRmQgIgc6uCKU k+szJZr2DhMxKyqT2MjTZ/r4zk1cWb1cG+fUNXgFrNilILGTvJ8kvDziR4CB2jxg8tsSAl3bM TZMOkFRxLmocBdzFj6iDCFaTGNJnC0t8rEf3NmvwFcxL9/oflxZw== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Original-Received: from drachen.dragon ([84.60.174.218]) by smtp.web.de (mrweb106 [213.165.67.124]) with ESMTPSA (Nemesis) id 1Mkmvd-1ppFnb07pv-00mMd8; Thu, 31 Aug 2023 01:09:12 +0200 In-Reply-To: (Alan Mackenzie's message of "Wed, 30 Aug 2023 12:57:29 +0000") X-Provags-ID: V03:K1:JfzrWjgpVyWPlSeeze+Vv3kmkImn0UvJJG7tVhVS9inVNkOSdXe QfbVN+zlkMaEH9UdhQZE0MMm9llmx4uiIEsFcyna+JgoLewhCYGyPaJTy+snUAhQwuY+/Ku zt9qBuZWpReXbkddjn4yxWP2/Qkrz6oKUDapBuuLVmGPLD8a0ZDydUc1Z+n392d5/Fg3KLT PKsGUXpE9bALarGtEZZcw== UI-OutboundReport: notjunk:1;M01:P0:4QQQRWzahf8=;eeTfazc6BXolVm4mztvO2RjXyBW oyBOWRc0LYOqSV2QluHFl8vhwtqjiZyCq4HXG5azk5eoyWJYmz9v6b7lJA4njgjsRO9J3dhkJ PZpFe2W5wvO+nq4e6VoXrefDH89T0OYHwfsxKxLfFFAYo7LZzaQrqp6jhfo9YUKDkffuLyTN9 UAUE/gJw05eBTQ2J216yTI5WjZJ9Gkab9hD/3rZQwKfx7MrhHGqC2cL9LHG1zzk9FY8B735Zs 0iov2x0vyUE9NUaynOLaHwlXmlj9SnSLsoKuvzfnz4Pti4an5Vzk44cofqgXbj7zNPeXgEFu0 CDOVQYpC+qjTIAOah13GloHsUFMvdUIW7qnGzq4+OdAPJ5LXGWNqbTbi4s+X4qv0EHm1Zp9/6 ETNC37vzV4DrBkpngg2B6aQoTGujg4vLZLEnBKcqiiHJbUW6uSbL1nWiNnm6R5cAYIX1jbMZ8 y1hLtv0/RfJLY6Iu+FNUeyPkp2xXcQMPqmJBftBtip0SAAAxuI1jmPQ1SpQpfDZOLJpxZfVUm 4O/bUl8MFC549yj0lsu3CSqPUz4CD8kxoVCC/zjgqNKpGeDPOFXvR1gcpk/45ulPDJkL2u4WN qXeqtG0fGP30rickJ6CjGKZX5/w3U1FKkuEiyB4H5dXIIysWuBQb4h+lBITmAL5IuyTr1KTQ5 BQRIx2CopaFfZBrrLtzxhak8NzC+0hnji5FOcn5TbKp5pp/MSAESwyJAtnXmrLI2mRRLJq8Hq Nv9BnMI9+1KrJ0541WaKJa4tZzs45AyIYXHKfm0jq7OEviBgh48tBB1HSQnwo/m1p0z9aHoV 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:268764 Archived-At: 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. Michael.