bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Lars Ingebrigtsen
Subject: bug#54225: [PATCH] with-demoted-errors: Fix macroexp-warn-and-return call
Date: Thu, 03 Mar 2022 15:36:09 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Kyle Meyer <kyle@kyleam.com> writes:

> 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.

[...]

> -      (macroexp-warn-and-return format "Missing format argument" exp))))
> +      (macroexp-warn-and-return "Missing format argument" exp))))

The code flow in with-demoted-errors is pretty confusing.  Can it be
improved upon instead of tweaked this way?  (`format' here will be
"Error: %S" at least in some cases, I guess?)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

[Prev in Thread] Current Thread [Next in Thread]