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#53526: 29.0.50; macroexp-warn-and-return API change Date: Sun, 30 Jan 2022 12:01:46 -0500 Message-ID: References: Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="786"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 53526@debbugs.gnu.org To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jan 30 18:04:03 2022 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 1nEDcQ-000ATN-RH for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 30 Jan 2022 18:04:03 +0100 Original-Received: from localhost ([::1]:60796 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nEDcP-0000wU-8N for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 30 Jan 2022 12:04:01 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:50728) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nEDaV-0005UF-Hs for bug-gnu-emacs@gnu.org; Sun, 30 Jan 2022 12:02:05 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44612) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nEDaU-0007XF-Km for bug-gnu-emacs@gnu.org; Sun, 30 Jan 2022 12:02:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nEDaU-00062U-Iq for bug-gnu-emacs@gnu.org; Sun, 30 Jan 2022 12:02:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 30 Jan 2022 17:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53526 X-GNU-PR-Package: emacs Original-Received: via spool by 53526-submit@debbugs.gnu.org id=B53526.164356211923198 (code B ref 53526); Sun, 30 Jan 2022 17:02:02 +0000 Original-Received: (at 53526) by debbugs.gnu.org; 30 Jan 2022 17:01:59 +0000 Original-Received: from localhost ([127.0.0.1]:37514 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nEDaR-000626-F0 for submit@debbugs.gnu.org; Sun, 30 Jan 2022 12:01:59 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:4717) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nEDaO-00061o-3U for 53526@debbugs.gnu.org; Sun, 30 Jan 2022 12:01:57 -0500 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 12275100189; Sun, 30 Jan 2022 12:01:50 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 77FDB10008C; Sun, 30 Jan 2022 12:01:48 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1643562108; bh=DD/SYXHJdIxbrEs35PNzxoZv7NyYQTwNAjAfU0mI7Zc=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=D7J04xzS+2SV6IxfTyRpvtxLs/27zw6YTrFxwAc6GitRB3cu9C3gH6k4EFlt9yJ3o d7lctRydPLgGpMcHjU31p7xIwljQCUAvhQD3/HbeyDHM8Z2r0OTr9PRgMJoJjuUtwe NyTodWrS74FtzfDX4xa97JWHKrgmknacd1U4/9ezyRKu1E7J9Un5adz/5muV4DnBnF T6EgtUdmD7jfZe0hPee8FFZwSZPoXyEwAP02vPXkM+eeD67d10R6JgYFOS6Dk9/8gJ FAeq14dHwlzAL/0iSXwHWZHBb98RAVO0dKrqDTMT+MwEQ2wgFH8M/NfCsMIep0K7vY 3Y9V5RBBTugNA== Original-Received: from pastel (76-10-138-212.dsl.teksavvy.com [76.10.138.212]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 4BB7312084D; Sun, 30 Jan 2022 12:01:48 -0500 (EST) In-Reply-To: (Alan Mackenzie's message of "Sun, 30 Jan 2022 13:34:00 +0000") 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:225616 Archived-At: >> No, its name was changed from "macroexp--" to "macroexp-" in Emacs-28, >> specifically to make available for third party packages. It was >> announced in etc/NEWS, for example. > Are you aware of it being used anywhere else but lisp/emacs-lisp? Yes and no: there's a use of `macroexp--warn-and-return` in `peg.el` (in GNU ELPA). This should be updated to use `macroexp-warn-and-return` when Emacs-28 is released. But changing the API this way will discourage its use outside of Emacs since it's be a pain to write code that deals with such changes (short of imposing Emacs-29 as the minimum supported version). >> Still, the current setup is really ugly: that var belongs in >> `bytecomp.el`. > Well, I suppose it could be defined in bytecomp.el and just declared in > macroexp.el. That's all we need. > It's not going to get used before it's been initialised in > bytecomp.el. If that's the case, it's even better. >> I'd put a double hyphen there simply because it's not something that we >> want to expose as an official API. Just because the bytecompiler's >> macroexpansion phase is implemented in a separate file doesn't justify >> making the var public. > OK, we can mange that. Thanks. > I suspect the difficulty in understanding this facility will have > strongly dissuaded any external hackers from attempting to use it. Could be. I suspect it's more a lack of exposure and the fact that most macros are quick hacks that don't bother to perform much checking. But it's definitely a facility that's useful for libraries that mostly define a DSL via macros, like `peg.el` and `bindat.el`. Stefan