GNU bug report logs - #54225
[PATCH] with-demoted-errors: Fix macroexp-warn-and-return call

Previous Next

Package: emacs;

Reported by: Kyle Meyer <kyle <at> kyleam.com>

Date: Thu, 3 Mar 2022 03:01:01 UTC

Severity: normal

Tags: moreinfo, patch

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Kyle Meyer <kyle <at> kyleam.com>
Subject: bug#54225: closed (Re: bug#54225: [PATCH] with-demoted-errors:
 Fix macroexp-warn-and-return call)
Date: Thu, 03 Mar 2022 15:15:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#54225: [PATCH] with-demoted-errors: Fix macroexp-warn-and-return call

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 54225 <at> debbugs.gnu.org.

-- 
54225: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=54225
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Kyle Meyer <kyle <at> kyleam.com>
Cc: lomov.vl <at> yandex.ru, 54225-done <at> debbugs.gnu.org
Subject: Re: bug#54225: [PATCH] with-demoted-errors: Fix
 macroexp-warn-and-return call
Date: Thu, 03 Mar 2022 10:14:04 -0500
Kyle Meyer [2022-03-02 22:00:35] wrote:

> 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

Thanks.  I used the patch below, instead.


        Stefan


diff --git a/lisp/subr.el b/lisp/subr.el
index eb9af0b36da..2321765f953 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 nil nil format))))
 
 (defmacro combine-after-change-calls (&rest body)
   "Execute BODY, but don't call the after-change functions till the end.


[Message part 3 (message/rfc822, inline)]
From: Kyle Meyer <kyle <at> kyleam.com>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] with-demoted-errors: Fix macroexp-warn-and-return call
Date: Wed,  2 Mar 2022 22:00:35 -0500
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




This bug report was last modified 3 years and 132 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.