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


Message #18 received at 54225 <at> debbugs.gnu.org (full text, mbox):

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Kyle Meyer <kyle <at> kyleam.com>, 54225 <at> debbugs.gnu.org,
 Stefan Monnier <monnier <at> iro.umontreal.ca>, lomov.vl <at> yandex.ru
Subject: Re: bug#54225: [PATCH] with-demoted-errors: Fix
 macroexp-warn-and-return call
Date: Fri, 04 Mar 2022 01:21:58 +0100
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> The code flow in with-demoted-errors is pretty confusing.  Can it be
> improved upon instead of tweaked this way?

Yesterday I dealt with that, and I think I understood most parts: the
code is a bit ugly but necessarily because the semantics are (also
necessarily due to backwards compatibility).  The cases to be supported
are:

- FORMAT is a string (and BODY not empty) - the expected use case

- FORMAT is nil: that's equivalent to FORMAT being "Error: %S"

- Anything else: also use the above default format string but
  additionally add that sexp to the BODY since it's expected to be code
  (backwards compatibility).  It works but you get a warning.

Once the third case will not be supported any more the code can be made
much simpler.

Michael.




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

Previous Next


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