From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#53618: 29.0.50; macroexp-warn-and-return incompatible change Date: Sat, 29 Jan 2022 11:28:10 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34388"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 53618@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jan 29 12:29:24 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 1nDlv1-0008pa-VC for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 29 Jan 2022 12:29:23 +0100 Original-Received: from localhost ([::1]:56152 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nDlv0-0004Xe-A5 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 29 Jan 2022 06:29:22 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:57410) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nDlug-0004RG-Aw for bug-gnu-emacs@gnu.org; Sat, 29 Jan 2022 06:29:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39925) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nDlug-0007iy-0G for bug-gnu-emacs@gnu.org; Sat, 29 Jan 2022 06:29:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nDluf-0007Nl-RZ for bug-gnu-emacs@gnu.org; Sat, 29 Jan 2022 06:29:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 29 Jan 2022 11:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53618 X-GNU-PR-Package: emacs Original-Received: via spool by 53618-submit@debbugs.gnu.org id=B53618.164345569928309 (code B ref 53618); Sat, 29 Jan 2022 11:29:01 +0000 Original-Received: (at 53618) by debbugs.gnu.org; 29 Jan 2022 11:28:19 +0000 Original-Received: from localhost ([127.0.0.1]:32821 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nDltz-0007MX-AV for submit@debbugs.gnu.org; Sat, 29 Jan 2022 06:28:19 -0500 Original-Received: from colin.muc.de ([193.149.48.1]:57994 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1nDltx-0007MJ-Av for 53618@debbugs.gnu.org; Sat, 29 Jan 2022 06:28:17 -0500 Original-Received: (qmail 76895 invoked by uid 3782); 29 Jan 2022 11:28:10 -0000 Original-Received: from acm.muc.de (p4fe158ec.dip0.t-ipconnect.de [79.225.88.236]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Sat, 29 Jan 2022 12:28:10 +0100 Original-Received: (qmail 7531 invoked by uid 1000); 29 Jan 2022 11:28:10 -0000 Content-Disposition: inline In-Reply-To: X-Submission-Agent: TMDA/1.3.x (Ph3nix) X-Primary-Address: acm@muc.de 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:225516 Archived-At: Hello, Stefan. On Fri, Jan 28, 2022 at 19:37:01 -0500, Stefan Monnier wrote: > Package: Emacs > Version: 29.0.50 > Alan's symbols-with-pos has introduced a backward incompatible change to > `macroexp-warn-and-return` by adding a new *first* argument `arg`. Yes. > The patch below changes that so the new argument comes last (and is > optional). Alan argued it's preferable for this arg to come first and > the function was new in Emacs-28 so it's OK to break compatibility. Something along those lines, yes. The new argument is not in any sense optional. It is absolutely required in order to generate a correct warning position. > The patch below shows that indeed the arg is almost always > desirable/needed to get the right position information (the default > behavior when the arg is absent is not as good), so it's kind of pain > having it as last arg. And I'm not super happy with the long list of > args of this function. It is a kind of wierd function. A long list of arguments is half to be expected. > But these arguments don't seem strong enough to justify > breaking compatibility, hence the patch below. There can be no compatibility here. The new function needs that extra argument. How about, instead, declaring the old function to be obsolete, to be replaced by a new one. The new name could be something like macroexp-warn-and-return-x. The position of the new argument in the argument list is not terribly important, though given its importance, being in first position might not be such a bad thing. > Any objection? Yes. See above. > Stefan [ .... ] -- Alan Mackenzie (Nuremberg, Germany).