From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18197 invoked by alias); 9 Jun 2014 02:11:28 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 32754 Received: (qmail 7690 invoked from network); 9 Jun 2014 02:11:15 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 From: Bart Schaefer Message-id: <140608191115.ZM20627@torch.brasslantern.com> Date: Sun, 08 Jun 2014 19:11:15 -0700 In-reply-to: <20140608225035.078a86a8@pws-pc.ntlworld.com> Comments: In reply to Peter Stephenson "Re: break/continue vs. try-always" (Jun 8, 10:50pm) References: <140603191227.ZM28198@torch.brasslantern.com> <140604223723.ZM22960@torch.brasslantern.com> <140605085319.ZM4272@torch.brasslantern.com> <20140606215853.0c6ecae9@pws-pc.ntlworld.com> <20140606224523.09d5f22c@pws-pc.ntlworld.com> <140606232250.ZM23057@torch.brasslantern.com> <20140608185401.35bed78f@pws-pc.ntlworld.com> <140608114123.ZM20229@torch.brasslantern.com> <20140608204358.4ec607b8@pws-pc.ntlworld.com> <140608140146.ZM20431@torch.brasslantern.com> <20140608225035.078a86a8@pws-pc.ntlworld.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Re: break/continue vs. try-always MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Jun 8, 10:50pm, Peter Stephenson wrote: } Subject: Re: break/continue vs. try-always } } On Sun, 08 Jun 2014 14:01:46 -0700 } Bart Schaefer wrote: } > } neater way to handle this would be to add an option to force break and } > } continue to respect function scope. } > } > The problem with that solution is that it propagates downward } } This is why I pointed out you could do } } setopt localoptions localloops } () { } setopt nolocalloops # or emulation or whatever } # call user code } } } # localloops is restored on return here and used to cancel breaks / } # contflag before resuming user code at this point. Ah, you didn't have the "setopt nolocalloops" in the anonymous scope the last time. OK, this is fine, and it sets up up well in the event that the austin-group decides to impose this semantics for Issue 8 (though it looks like they're going to make it unspecified instead). -- Barton E. Schaefer