From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10565 invoked by alias); 29 Sep 2016 21:50:08 -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: 39506 Received: (qmail 10932 invoked from network); 29 Sep 2016 21:50:08 -0000 X-Qmail-Scanner-Diagnostics: from mail-pa0-f54.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.220.54):SA:0(0.0/5.0):. Processed in 0.125811 secs); 29 Sep 2016 21:50:08 -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=OR95w/YnD9YQ0iJcZXc4XQTloRxBR/2gZJQF4zXz3Z8=; b=ktuFs/P/sXccMiwBsrg1T/4z2LNGW3ujoUVumpSgXesYMsIOZ7Gp6ckIZY9JvDVIna TYXu2HzxD3oUkI7xGFbq4gApUc4Zc7hrQdBtVo4WjtI1Z3cCuWFzOdDDht2y1hce+SHn nIxK3yfl8Hjo+ZQmEcNcMRUiZ4Qinyw2EI546irH4/fTiVtjdrOoOT1TuaS64AD6pyfM NzS/yrHQ4LibJU1i8bBoV+qmInna5N5ry2G2lfNGkKTQSVtZILxtKuU2mHZpbtxczib4 qLLS5jMmjWDp+Ob5ck0LTD0tCGz2OzJUEwWo0XBfUhot0QZB163Zs/FFfD/rtpM2KuQl Yzkg== 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=OR95w/YnD9YQ0iJcZXc4XQTloRxBR/2gZJQF4zXz3Z8=; b=dZuAIDT2S1fdR7aiyGiNKMu/MTS3IoG2y6jiVCIOXctEiDR2ELrG15VzOPXjrx3/+V cjgnyAWwnSoUa1tkrRB7vWZTx6Y9MFldQpy/wAn83uJS5sclGseUO4TwdGrTORr8e8uG ck7ZzWsDEtz0HhzLnTNoQEsuN3msVIqkbqJNhwUZNQMRbepPMWTcA8WCVJdlluT9RwEt f/4uj98xi5DLCUKPd0O9uf2g2B50sdRglPj8T3go4P6T5NEANlgPj50gCLJ603lkL8ot jfH98AjtBCh9KtrlAMSUTO1kz3/hirG9lR/Bzkfd/56kK+yTHuFhfBnvCF9TlSDXfjBy jKAA== X-Gm-Message-State: AA6/9RlDHCHn/l9ho+CJwZcBNQvSBCewsYGyY/kex4ARZ9DZlju66+Gj60lKNnVNdrrRRQ== X-Received: by 10.66.49.197 with SMTP id w5mr6065429pan.73.1475185803649; Thu, 29 Sep 2016 14:50:03 -0700 (PDT) From: Bart Schaefer Message-Id: <160929145022.ZM12459@torch.brasslantern.com> Date: Thu, 29 Sep 2016 14:50:22 -0700 In-Reply-To: Comments: In reply to Sebastian Gniazdowski "Re: Surprising effect of fun() { local FPATH=...; autoload -X }, and a bug" (Sep 29, 3:58pm) References: <160929001004.ZM27686@torch.brasslantern.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: Zsh hackers list 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 29, 3:58pm, Sebastian Gniazdowski wrote: } } Turns out a normal fpath-extending loading support is needed for } Zplugin, unless a creative solution is found Your autoload wrapper that sets up the "local FPATH" needs to store the FPATH value for each module somewhere, e.g., in a has indexed on the module name, and then recall that every time another autoload occurs from inside a function that was loaded from that module. Whether it's possible to find that the name of the module at the necessary time, is a harder question. In 5.3 "whence -v" will reliably give you the path from which the function was loaded, but it may not in earlier versions.