From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: unwind-protect within while-no-input Date: Tue, 07 May 2024 21:49:41 +0300 Message-ID: <86msp1a24a.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39179"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Spencer Baugh Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue May 07 20:50:36 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1s4Ptb-0009v8-2C for ged-emacs-devel@m.gmane-mx.org; Tue, 07 May 2024 20:50:35 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s4Pss-0003PV-RG; Tue, 07 May 2024 14:49:50 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s4Psq-0003Ol-Pp for emacs-devel@gnu.org; Tue, 07 May 2024 14:49:48 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s4Pso-0000jJ-MU; Tue, 07 May 2024 14:49:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=fUiq7jSaH/XFSYwyB4z8OFUHczvFMWPuVWdaREqZ7/4=; b=hQ3GWbXv88N9 mOzuQLywOpOyccTMD2GC3kx0DZm5rurprasKw46SFHex/6iNg6Lgf6MhTbkH7rY361Wh5pYWZTbSh JvDFZHgfDZDfO6xHHyv5hKwojDA1wTrgARRDe6GrZeqwBIkTVedlOVXwJEVHrVaBA7lFqyRv3vwhM R4EVh0DiNwJIe5f98dbnt6yL9X3B0zdt+IQXIBnuckIQK4Pe0ap3QtKnkuhlrtAcnieZG8EguNZ7t I2Ng1qzVfxkTXawsWPinJ3SZGr1dAQ9AcF0ervlq6Yt9gtbeLXmInrPzpGeepzV6p3oElnnTHho0P z1B/q8o+d77S2EfNBtC+zw==; In-Reply-To: (message from Spencer Baugh on Tue, 07 May 2024 14:05:54 -0400) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:318972 Archived-At: > From: Spencer Baugh > 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