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: Eli Zaretskii
Subject: Re: unwind-protect within while-no-input
Date: Tue, 07 May 2024 21:49:41 +0300

> From: Spencer Baugh <sbaugh@janestreet.com>
> Date: Tue, 07 May 2024 14:05:54 -0400
> 
> It seems like it's impossible right now to use unwind-protect robustly
> in face of quits, because a quit triggered in the body forms of the
> unwind-protect will also interrupt the unwind forms.

I think you can use condition-case for that:

  (setq foo
        (condition-case nil
            (while t nil)
          (quit 'interrupted))) C-M-x C-g
    => interrupted



reply via email to

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