From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20278 invoked by alias); 30 Sep 2016 18:16:53 -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: 39524 Received: (qmail 1788 invoked from network); 30 Sep 2016 18:16:53 -0000 X-Qmail-Scanner-Diagnostics: from mail-pf0-f169.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(209.85.192.169):SA:0(0.0/5.0):. Processed in 0.793792 secs); 30 Sep 2016 18:16:53 -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=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: schaefer@brasslantern.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at brasslantern.com does not designate permitted sender hosts) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version; bh=xr64VZbgXgXgSEKfxfkE9CDTGN2mW1hkQYtwWiEsZaI=; b=OMJr5RgQNNTnXsjw0uqW01eFTxwnoS1TkI1YWW7lME9XW8ltPUyNc4X72fIuPlat6G TiF/psKJ0CgRyDJHJ7vVLPBe82pF8ww2CtmTNAiawvLmy9JzRd37ngRSHRCEWcllxoD4 3QZ2fW6OxRvAN2Jj37C9bMe4E+h9+I+d+1vYVzWStBwZ+DXprdrHjPwq9chKAkiH839J 6j8/dg3eWn6vA06TJ34VNjmTVfEFf8mKZ6KK/Wryp2C5Q7rppaEGJhdPvQlkA/D3A2sF juup+vNQ/ZKpuASDJYK1rA4L9uT5cvP7EAx0l9sfm+oHbMv9GYbv+u59kyEKWXTEK4lg jxsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:mime-version; bh=xr64VZbgXgXgSEKfxfkE9CDTGN2mW1hkQYtwWiEsZaI=; b=ZTfMGJTX4l/DbGxLB2BK4lr2bMatl6eXC8O4LMFNxfPJ9gOTeptUTCe8lpCYUDldHz AXuBRSnSyxTPoOgDCEmNoo9dp5NOZlFIB7+FrzmoJ3Mhr72O/8l8Ui/bH+IV40ylvRz9 tQboZeE2fao58wSyMAcRBsZxY3/fnbprD1tOTYtlWhpj5oULIGysQoNZPZOewSAHWfmX GF8978JFJXSIqEz5ucwW4CsvmeHsmAZWFnWedqFjHJ2hLa8/nB+LzwtO+xwyCp1WV/Cd 3GJpXQr/IjIimfgDtQwtZJ077VVYbReGCWenLH3gP0uYky1ofrGayreM+SqOq3iaakRb XerQ== X-Gm-Message-State: AA6/9RmCjSCZo9nY6WWRnNQuAKiyMBk9nP8c4bPUt+Tg6F3Ze0xXBy8+KjVc6aSqWnl9fg== X-Received: by 10.98.72.88 with SMTP id v85mr14093583pfa.162.1475259404044; Fri, 30 Sep 2016 11:16:44 -0700 (PDT) From: Bart Schaefer Message-Id: <160930111653.ZM16655@torch.brasslantern.com> Date: Fri, 30 Sep 2016 11:16:53 -0700 In-Reply-To: <20160930064941.GA23665@fujitsu.shahaf.local2> Comments: In reply to Daniel Shahaf "Re: Surprising effect of fun() { local FPATH=...; autoload -X }, and a bug" (Sep 30, 6:49am) References: <160929001004.ZM27686@torch.brasslantern.com> <160929145022.ZM12459@torch.brasslantern.com> <20160930064941.GA23665@fujitsu.shahaf.local2> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Re: Surprising effect of fun() { local FPATH=...; autoload -X }, and a bug MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Sep 30, 6:49am, Daniel Shahaf wrote: } } Would it work to declare FPATH as a private in the wrapper? (Using } zsh/param/private) } } Sebastian said on IRC it wouldn't work but I don't see why. It would work, but it doesn't help -- there's a three-stage process: 1. autoload wrapper creates stub function containing local FPATH 2. stub function runs using that FPATH to load the real function 3. real function runs and calls real autoload instead of wrapper The problem Sebastian wants to address is, how to get *this* real function to call the wrapper autoload *without* forcing all usages of autoload to call the wrapper.