From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Kyle Meyer Newsgroups: gmane.emacs.bugs Subject: bug#54225: [PATCH] with-demoted-errors: Fix macroexp-warn-and-return call Date: Wed, 2 Mar 2022 22:00:35 -0500 Message-ID: <20220303030035.570230-1-kyle@kyleam.com> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19974"; mail-complaints-to="usenet@ciao.gmane.io" Cc: lomov.vl@yandex.ru To: 54225@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Mar 03 04:01:34 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 1nPbif-000511-JE for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 03 Mar 2022 04:01:34 +0100 Original-Received: from localhost ([::1]:33014 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nPbie-0005Ab-Gt for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 02 Mar 2022 22:01:32 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:41772) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nPbiA-0005AM-KU for bug-gnu-emacs@gnu.org; Wed, 02 Mar 2022 22:01:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47207) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nPbiA-0001sV-BQ for bug-gnu-emacs@gnu.org; Wed, 02 Mar 2022 22:01:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nPbiA-0006Pg-43; Wed, 02 Mar 2022 22:01:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Kyle Meyer Original-Sender: "Debbugs-submit" Resent-CC: lomov.vl@yandex.ru, bug-gnu-emacs@gnu.org Resent-Date: Thu, 03 Mar 2022 03:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 54225 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org X-Debbugs-Original-Xcc: lomov.vl@yandex.ru Original-Received: via spool by submit@debbugs.gnu.org id=B.164627646024636 (code B ref -1); Thu, 03 Mar 2022 03:01:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 3 Mar 2022 03:01:00 +0000 Original-Received: from localhost ([127.0.0.1]:41104 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nPbi8-0006PI-9b for submit@debbugs.gnu.org; Wed, 02 Mar 2022 22:01:00 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:51708) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nPbi6-0006PA-60 for submit@debbugs.gnu.org; Wed, 02 Mar 2022 22:00:58 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:41760) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nPbi5-0005AD-Uk for bug-gnu-emacs@gnu.org; Wed, 02 Mar 2022 22:00:57 -0500 Original-Received: from out2.migadu.com ([188.165.223.204]:26373) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nPbi3-0001mI-TP for bug-gnu-emacs@gnu.org; Wed, 02 Mar 2022 22:00:57 -0500 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kyleam.com; s=key1; t=1646276453; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=PwC/zh02jtstImNErNQpx/0WvDm0QrVAlOqrOpJcS7A=; b=dBVThS+ga7S44dyydutBGPQcpV0QCYuY6uqJADrEFWZsBF1n/UJzkzENgjBQC34/nCaPvx nd11ZDWDfhxqW2kHEL+rZ09qTJ2T8rr2W+FvcztAUgJpPJWzjxeRIAXJlpC9REX8paNF4W z++0jqsDhhNOBsjNbT38tqglkTqP/GTdxtE45irz92FrjbsK6C/uL/6FoZotgj76t+qOBk e0yq3AdMKaJRb+dcYNj7x1xQVypH/5H5hgKDeWiPR2KdiHbjfNn5deC9fmNr+Kd8C6+EVu kl2c17WLIQ6McjJZAJ++xPLlJFIZrI0sKL3afFkPcelySJRTpDVcUz0Ed92wQw== X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: kyleam.com Received-SPF: pass client-ip=188.165.223.204; envelope-from=kyle@kyleam.com; helo=out2.migadu.com 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, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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:227917 Archived-At: The macroexp-warn-and-return call added to with-demoted-errors in d52c929e31f (2022-02-04) is incorrect. The with-demoted-errors format string is passed as MSG, the actual message is passed as FORM, and the form is passed as CATEGORY, leading to with-demoted-errors returning "Missing format argument". * lisp/subr.el (with-demoted-errors): Call macroexp-warn-and-return with correct arguments. --- lisp/subr.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/subr.el b/lisp/subr.el index eb9af0b36da..7dde7589dd9 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -4560,7 +4560,7 @@ with-demoted-errors (if (eq orig-body body) exp ;; The use without `format' is obsolete, let's warn when we bump ;; into any such remaining uses. - (macroexp-warn-and-return format "Missing format argument" exp)))) + (macroexp-warn-and-return "Missing format argument" exp)))) (defmacro combine-after-change-calls (&rest body) "Execute BODY, but don't call the after-change functions till the end. base-commit: 543640628607ec06e9698cc50c33497ca75155a4 -- 2.34.0