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: Wed, 08 May 2024 15:12:44 +0300

> Date: Wed, 08 May 2024 13:42:50 +0200
> From:  Michael Heerdegen via "Emacs development discussions." 
> <emacs-devel@gnu.org>
> 
> Po Lu <luangruo@yahoo.com> writes:
> 
> > ?  Just a stab in the dark, I'm afraid.
> 
> `unwind-protect' works as expected:
> 
> #+begin_src emacs-lisp
> (let (foo)
>   (while-no-input
>     (unwind-protect (while t nil)
>       (setq foo 'interrupted)))
>   (message "foo: %s" foo))
> #+end_src

It does, indeed, work, but it doesn't discern between C-g and any
other input.



reply via email to

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