From: Michael Heerdegen <michael_heerdegen@web.de>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: Kyle Meyer <kyle@kyleam.com>,
54225@debbugs.gnu.org, Stefan Monnier <monnier@iro.umontreal.ca>,
lomov.vl@yandex.ru
Subject: bug#54225: [PATCH] with-demoted-errors: Fix macroexp-warn-and-return call
Date: Fri, 04 Mar 2022 01:21:58 +0100 [thread overview]
Message-ID: <87ee3ipnx5.fsf@web.de> (raw)
In-Reply-To: <87o82nhzmu.fsf@gnus.org> (Lars Ingebrigtsen's message of "Thu, 03 Mar 2022 15:36:09 +0100")
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.
next prev parent reply other threads:[~2022-03-04 0:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-03 3:00 bug#54225: [PATCH] with-demoted-errors: Fix macroexp-warn-and-return call Kyle Meyer
2022-03-03 14:36 ` Lars Ingebrigtsen
2022-03-04 0:21 ` Michael Heerdegen [this message]
2022-03-03 15:14 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ee3ipnx5.fsf@web.de \
--to=michael_heerdegen@web.de \
--cc=54225@debbugs.gnu.org \
--cc=kyle@kyleam.com \
--cc=larsi@gnus.org \
--cc=lomov.vl@yandex.ru \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).