[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lisp unwind-protect question

From: David Kastrup
Subject: Re: lisp unwind-protect question
Date: 05 Mar 2002 23:19:54 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2.50

address@hidden writes:

> 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?

Sure.  What about "If BODYFORM exits nonlocally, the UNWINDFORMS are
executed anyway" don't you understand?  And, if not, why don't you
look it up in the Elisp manual which is more explicit about this?

David Kastrup, Kriemhildstr. 15, 44793 Bochum
Email: address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]