From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29572 invoked by alias); 9 Jun 2016 18:10:27 -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: 38642 Received: (qmail 27990 invoked from network); 9 Jun 2016 18:10:24 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:reply-to:subject:references:to:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-transfer-encoding; bh=OM66qcKAsqwbRKQjo0OZ2p8EtmqLB4m03R7ux2jyURc=; b=GMm3g0jPD4S/2T5Wa2/lGKRIqzUPVPU4EbBQP1FF28K1Z35kJhvS1blyGMMXBguW8b PpkyeinUrdqKKXxWnc3sSBEh4GAvvP9QGJwKZAFkpJY8rC3IslEMdKfL5G28/Aa6mtsX kd7Ee3lWIdCHF2aWEk/zOlS1n7XS540BgOYnX9Nx63yQvt+MTA8p+lucMiBXg7EJb9Mz ONGkUye4KEDWoNN7I2pkSFhXNRMI+TzfMlgnpIKifxGH6p5g0MXntq1CUuJirHlip4zT d56M0bLB/rOuLNYVriE0cDaTK1046lXPJZQR77xnb7omrLRyofracUywq9AiUuCazNYk scIg== X-Gm-Message-State: ALyK8tL1T1rDUPLw1Jy4IzLlZJIIEOX3gN3FpDsgXZCtO1ijg2riMifXS1wHPuYU03a6YcaC X-Received: by 10.28.54.134 with SMTP id y6mr13679505wmh.96.1465495821643; Thu, 09 Jun 2016 11:10:21 -0700 (PDT) Reply-To: Marko Myllynen Subject: Re: When local state_descr is needed? References: <57593D7F.40604@redhat.com> <2042.1465483424@thecus.kiddle.eu> To: zsh-workers@zsh.org From: Marko Myllynen Organization: Red Hat Message-ID: <5759B10B.6020604@redhat.com> Date: Thu, 9 Jun 2016 21:10:19 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 In-Reply-To: <2042.1465483424@thecus.kiddle.eu> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Hi, On 2016-06-09 17:43, Oliver Kiddle wrote: > Marko Myllynen wrote: >> >> It's a bit unclear to me when local state_descr should be declared. >> Reading the man page makes me think that it certainly doesn't hurt to >> do it especially when using the ->string convention but is it in fact >> needed then to avoid any potential or concrete side-effect? > > _main_complete declares it local so it mostly isn't needed. > > state_descr was added much later so there were many existing functions > that didn't declare it local. Even before, we've often been lax about > declaring opt_args. > > I tend to only declare it in functions that reference it. > I don't think it's really worth patching vast numbers of functions [...] Thanks, all clear now. Cheers, -- Marko Myllynen