|
From: | Michael Heerdegen |
Subject: | bug#54225: [PATCH] with-demoted-errors: Fix macroexp-warn-and-return call |
Date: | Fri, 04 Mar 2022 01:21:58 +0100 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Lars Ingebrigtsen <larsi@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.
[Prev in Thread] | Current Thread | [Next in Thread] |