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

From: Mattias Engdegård <[email-masked]>
Date: Sun, 11 Apr 2021 13:13:37 +0200

11 apr. 2021 kl. 01.52 skrev Stefan Monnier <[email-masked]>:

> In the tests, you might want to add one with a lambda expression which
> captures a mutated success variable, as in
> 
>    (apply (condition-case res
>               42
>             (:success (prog1 (list (lambda (x) (+ res x)) res)
>                         (setq res 0)))))
> 
> since this requires special handling in cconv.el.

Good catch! Fixed on master. (And I've added more test cases to the patch.)

> Any particular reason you chose ;success instead of :no-error?

Only a few weak reasons -- some conditions (like quit) aren't errors, although the documentation is very inconsistent on that point. And :success felt slightly more descriptive, and it doesn't have a negation in the name.

Names like :default, :else, :otherwise etc were rejected because they could be interpreted as 'any other error'.

It may be a bit too far over the moon though. Would :not-a-complete-failure be better? Fits my gloomy national temperaments (all of them) better.

Still undecided!