[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: |
Mon, 12 Apr 2021 21:20:24 +0200 |
Here is an updated patch that reduces some code duplication in the compiler and
fixes an embarrassing bug, and as a bonus, an experimental add-on that allows
catching throws in condition-case using the handler syntax
((:catch TAG) BODY...)
Unfortunately but unsurprisingly the decision to evaluate the TAG expressions
made everything much messier than anticipated. It does work, though, and if you
would like to redefine `catch` as the macro
(defmacro catch (tag &rest body)
(let ((var (gensym)))
`(condition-case ,var (progn ,@body) ((:catch ,tag) ,var))))
then that will work, too (with minor byte-code inefficiency that could easily
be addressed).
Any combination of error, :catch and :success handlers is permitted, making
this a very versatile construct.
It may be a good idea to do away with the TAG evaluation since that flexibility
isn't likely to be in high demand.
0001-Add-condition-case-success-handler-bug-47677.patch
Description: Binary data
catch-in-condition-case.diff
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, 2021/04/11
- 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 <=
- 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
- bug#47677: [PATCH] condition-case success continuation, Mattias Engdegård, 2021/04/22
- bug#47677: [PATCH] condition-case success continuation, Richard Stallman, 2021/04/23
- bug#47677: [PATCH] condition-case success continuation, Mattias Engdegård, 2021/04/24