[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#47677: [PATCH] condition-case success continuation
From: |
Mattias Engdegård |
Subject: |
bug#47677: [PATCH] condition-case success continuation |
Date: |
Sun, 11 Apr 2021 13:13:37 +0200 |
11 apr. 2021 kl. 01.52 skrev Stefan Monnier <monnier@iro.umontreal.ca>:
> 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!
0001-Add-condition-case-success-handler-bug-47677.patch
Description: Binary data
- bug#47677: [PATCH] condition-case success continuation, Mattias Engdegård, 2021/04/09
- bug#47677: [PATCH] condition-case success continuation, Stefan Monnier, 2021/04/10
- bug#47677: [PATCH] condition-case success continuation,
Mattias Engdegård <=
- bug#47677: [PATCH] condition-case success continuation, Lars Ingebrigtsen, 2021/04/12
- bug#47677: [PATCH] condition-case success continuation, Stefan Monnier, 2021/04/12
- bug#47677: [PATCH] condition-case success continuation, Mattias Engdegård, 2021/04/12
- bug#47677: [PATCH] condition-case success continuation, Lars Ingebrigtsen, 2021/04/13
- bug#47677: [PATCH] condition-case success continuation, Mattias Engdegård, 2021/04/13
- bug#47677: [PATCH] condition-case success continuation, Lars Ingebrigtsen, 2021/04/14
- bug#47677: [PATCH] condition-case success continuation, Mattias Engdegård, 2021/04/15
- bug#47677: [PATCH] condition-case success continuation, Richard Stallman, 2021/04/16
- bug#47677: [PATCH] condition-case success continuation, Richard Stallman, 2021/04/16
- bug#47677: [PATCH] condition-case success continuation, Stefan Kangas, 2021/04/21