From unknown Sat Jun 21 10:46:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#76778: edebug chokes on cl-macrolet in macro expansions Resent-From: Daniel Colascione Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 06 Mar 2025 09:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 76778 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 76778@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.174125197723717 (code B ref -1); Thu, 06 Mar 2025 09:07:01 +0000 Received: (at submit) by debbugs.gnu.org; 6 Mar 2025 09:06:17 +0000 Received: from localhost ([127.0.0.1]:41487 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tq7BJ-0006AT-Ge for submit@debbugs.gnu.org; Thu, 06 Mar 2025 04:06:17 -0500 Received: from lists.gnu.org ([2001:470:142::17]:38310) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tq7BG-0006AD-Ty for submit@debbugs.gnu.org; Thu, 06 Mar 2025 04:06:15 -0500 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 1tq7B4-0000ln-IF for bug-gnu-emacs@gnu.org; Thu, 06 Mar 2025 04:06:04 -0500 Received: from dancol.org ([2600:3c01:e000:3d8::1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tq7Ay-0006Fm-2l for bug-gnu-emacs@gnu.org; Thu, 06 Mar 2025 04:06:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Type:MIME-Version:Message-ID:Date:Subject:To:From:Sender: Reply-To:Cc:Content-Transfer-Encoding:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=7Xv6DXfLv2wlTLaTSbV8Gk9+HiGXWIDjfUPLbReIWWQ=; b=IXw/a+nXu70O6PMnXfJV19I1eh 5FccVtTUr8usC+zS7nvssiHUdQVWYP+Y4fu97uaVZxhcmYmJB0JvH3/0enATxRCbb4DZtvJSIQroY s36amYtbO1vJcO280qEp0qNLUL1iIAoyD88n0lnl+tyNZS+9xnC3MHVsFMeTpPW4uhf/rL2JDxpw2 kvHhkQY0S8eSOIKZLACoqkXhn/vL1QmuFpPhMb3x7nRImlyFnXM0tlr3hKpqnY0OWiDCeqWxfb3E0 FSAjsFxedn29iNjcaFheWNhM6X0ntmN2fB+Ve0bEe7oRImLSRoRUd9S31zOvSDDJjuPz6Uy5+zWXA h51GSYxQ==; Received: from dancol by dancol.org with local (Exim 4.96) (envelope-from ) id 1tq7Ah-0022eM-0B for bug-gnu-emacs@gnu.org; Thu, 06 Mar 2025 04:05:39 -0500 From: Daniel Colascione User-Agent: mu4e 1.12.8; emacs 31.0.50 Date: Thu, 06 Mar 2025 01:05:48 -0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2600:3c01:e000:3d8::1; envelope-from=dancol@dancol.org; helo=dancol.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.9 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.1 (/) In the snippet below, edebug-instrumenting my-fn breaks, but instrumenting the morally equivalent my-fn2 works. ;; -*- lexical-binding: t -*- (cl-defmacro my-wrapper (&rest body) (declare (debug (body))) `(cl-macrolet ((my-local-macro (x) (declare (debug (sexp))) (cl-check-type x symbol) nil)) ,@body)) ;; edebug instrument this fails the check-type above my-local-macro ;; gets (edebug-after 0 2 thing) instead of thing. (defun my-fn () (my-wrapper (my-local-macro thing))) ;; edebug instrument works fine (defun my-fn2 () (cl-macrolet ((my-local-macro (x) (declare (debug (sexp))) (cl-check-type x symbol) nil)) (my-local-macro thing)))