From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15946 invoked from network); 5 Jun 1998 08:48:07 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 5 Jun 1998 08:48:07 -0000 Received: (from list@localhost) by math.gatech.edu (8.8.5/8.8.5) id EAA17314; Fri, 5 Jun 1998 04:43:45 -0400 (EDT) Resent-Date: Fri, 5 Jun 1998 04:43:45 -0400 (EDT) From: Zefram Message-Id: <199806050844.JAA20993@taos.demon.co.uk> Subject: Re: emulate -R resets localoptions To: borsenkow.msk@sni.de (Andrej Borsenkow) Date: Fri, 5 Jun 1998 09:44:19 +0100 (BST) Cc: zsh-workers@math.gatech.edu In-Reply-To: <005901bd9057$b7a4fe80$21c9ca95@ao13.mow.sni.de> from "Andrej Borsenkow" at Jun 5, 98 11:58:23 am X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Resent-Message-ID: <"bjZ5g1.0.TE4.1_wTr"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/4050 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Andrej Borsenkow wrote: >emulate -R seems to reset *all* options, in particular localoptions. That's what it's supposed to do. At least, it is supposed to reset all configuration options -- it does not set the options relating to the state of the shell, such as INTERACTIVE and PRIVILEGED. > it breaks my simple notion, that I should be able to say > >function foo() { > setopt localoptions > >and then set *any* option without fear, that it will mess the caller. You can't set NO_LOCAL_OPTIONS without fear in any case. Your `simple notation' is wrong -- you should set LOCAL_OPTIONS *after* setting other options. LOCAL_OPTIONS is tested when the function returns, not when options are set. -zefram