[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
lisp unwind-protect question
From: |
phr-2002 |
Subject: |
lisp unwind-protect question |
Date: |
5 Mar 2002 21:11:35 -0000 |
The doc string for unwind-protect says:
Do BODYFORM, protecting with UNWINDFORMS.
Usage looks like (unwind-protect BODYFORM UNWINDFORMS...).
If BODYFORM completes normally, its value is returned
after executing the UNWINDFORMS.
If BODYFORM exits nonlocally, the UNWINDFORMS are executed anyway.
So if you say
(unwind-protect
(foo)
(bar)
(baz))
What's supposed to happen if (bar) signals an error? Does (baz) still
get run?
What if bar doesn't signal an error by itself, but some asynchronous
signal arrives (e.g. user hits C-g) while bar is running?
How do Lisp systems in general (not just Emacs Lisp) deal with this
situation? I guess it's easy for me to check Emacs Lisp's behavior by
experiment, but it's the general question about other Lisps that
interests me most.
I hope this isn't too off-topic for this list.
Thanks
Paul
- lisp unwind-protect question,
phr-2002 <=