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: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Kyle Meyer <kyle <at> kyleam.com>
Cc: 54225 <at> debbugs.gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca>, lomov.vl <at> yandex.ru
Subject: bug#54225: [PATCH] with-demoted-errors: Fix macroexp-warn-and-return call
Date: Thu, 03 Mar 2022 15:36:09 +0100
Kyle Meyer <kyle <at> 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




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

Previous Next


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