emacs-devel
[Top][All Lists]
Advanced

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

Re: unwind-protect within while-no-input


From: Michael Heerdegen
Subject: Re: unwind-protect within while-no-input
Date: Wed, 08 May 2024 22:34:32 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Eli Zaretskii <eliz@gnu.org> writes:

> > If I have a function:
> > 
> > (defun my-function ()
> >   ...do something...)
> > 
> > which might be invoked by some other package that I don't control
> > like this:
> > 
> > (defun some-other-package ()
> >   (while-no-input
> >     ...
> >     (my-function)
> >     ...))
> > 
> > How does my-function run the unwind-forms when it is interrupted by
> > while-no-input?
>
> How can a function cause its caller to do anything at all?  It can't.
> If the caller wants to make sure some unwind-forms will always run
> after my-function either returns locally or exits non-locally, the
> caller needs to arrange for that.

Unless "the unwind forms" are run by `my-function'.  The picture is
still incomplete (and missing the subject of the question).

Michael.




reply via email to

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