Subject: bug#47677: [PATCH] condition-case success continuation

From: Mattias Engdegård <[email-masked]>
Date: Tue, 13 Apr 2021 10:52:54 +0200

13 apr. 2021 kl. 09.38 skrev Lars Ingebrigtsen <[email-masked]>:

>>  ((:catch TAG) BODY...)
> 
> I'm not quite sure I understand the use case for this -- we already have
> a general catch/throw infrastructure, so this sounds like a somewhat odd
> addition.

Oh, it was just proof-of-concept code to show that such a generalisation would be possible should it be desired later. It's not part of the immediate proposal. Sorry about the confusion.

Our present `catch` has the same flaw as `condition-case` in that it does not give access to the success continuation, leading to hacks similar to the one you mentioned. We could extend `catch` instead, maybe like this:

  (catch TAG :in BODY-FORM :success VAR SUCCESS-FORM)

but what if you want to catch multiple tags, or both throws and errors? The constructs don't compose; nesting them hides the success continuation of the inner forms.