From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#60450: 30.0.50; Strange behavior of compiler macros in *scratch* Date: Mon, 08 May 2023 08:25:41 -0400 Message-ID: References: Reply-To: Stefan Monnier 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="15329"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 60450@debbugs.gnu.org To: Gerd =?UTF-8?Q?M=C3=B6llmann?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon May 08 14:26:42 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 1pvzww-0003lS-MF for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 08 May 2023 14:26:42 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pvzwV-0003Tu-Ug; Mon, 08 May 2023 08:26:16 -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 1pvzwN-0003Tb-As for bug-gnu-emacs@gnu.org; Mon, 08 May 2023 08:26:08 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pvzwI-0003Cg-R1 for bug-gnu-emacs@gnu.org; Mon, 08 May 2023 08:26:06 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pvzwI-00038O-Ma for bug-gnu-emacs@gnu.org; Mon, 08 May 2023 08:26:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 08 May 2023 12:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60450 X-GNU-PR-Package: emacs Original-Received: via spool by 60450-submit@debbugs.gnu.org id=B60450.168354875612036 (code B ref 60450); Mon, 08 May 2023 12:26:02 +0000 Original-Received: (at 60450) by debbugs.gnu.org; 8 May 2023 12:25:56 +0000 Original-Received: from localhost ([127.0.0.1]:39537 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pvzwB-000383-T6 for submit@debbugs.gnu.org; Mon, 08 May 2023 08:25:56 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:40067) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pvzw9-00037p-TP for 60450@debbugs.gnu.org; Mon, 08 May 2023 08:25:54 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 30237441134; Mon, 8 May 2023 08:25:48 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id E21A8440FE9; Mon, 8 May 2023 08:25:46 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1683548746; bh=UrZlhT6ZDLnm2xwcg4kdEJlYCKMe8mZVf99ENgaIjTo=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=G3pR4M62A/qcVrttHb37dBO2/7zqeKqe5++OqjUWsoixJnZy8B6CkPyyKqYaygCyx pe93ALUezpt4REz8zvmQRBxM1ASTBAMNa3kOfPPIUbhYBYKZ8MeQqWumCdS6zx7+cp M+bRExkS+WXHORkX8rNhhq3j3LrbMS+8LGG5UG9xql5xAnyzi5zuJqVLuQt34eR+bI 3uWLbXIyo29Z5lvkFve7eRRLWBLNIHqE5kyrZW9jLAQMuERvYH13ehNHu+pmgzz47r CacvjKDQGmZ0cCaaE5u9nH9wYw7W+BDjr16dAB3easpZ1SSuSvYlPoMj4A4SnLDz+x 96fpfrQiWhCGw== Original-Received: from pastel (unknown [45.72.217.176]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 90965120905; Mon, 8 May 2023 08:25:46 -0400 (EDT) In-Reply-To: ("Gerd =?UTF-8?Q?M=C3=B6llmann?="'s message of "Sat, 31 Dec 2022 14:22:31 +0100") 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:261315 Archived-At: > The doc string of cl-define-compiler-macro says > "This is like =E2=80=98defmacro=E2=80=99, but macro expansion occurs on= ly if the call to > FUNC is compiled (i.e., not interpreted)." `cl-define-compiler-macro` is built on top of the "new" ELisp compiler macro feature. I think that feature is documented vaguely (poorly?) enough that it does allow expansion (or not) for interpreted code. > C-j is bound to eval-print-last-sexp, which I wouldn't expect to compile > anything, and its doc string doesn't mention anything AFAICS. Not sure if > that's a bug in the code or something missing in the docs. Trying to distinguish those calls to `macroexpand-all` which come from the compiler from those that come from elsewhere doesn't seem worth the trouble, so I'd rather consider it as a doc bug. The doc should also make it clear that contrary to `defmacro` there is no guarantee that it will be called (nor *when* it's called). Stefan