From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7827 invoked by alias); 24 Jan 2016 15:22:39 -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: 37764 Received: (qmail 4076 invoked from network); 24 Jan 2016 15:22:38 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) 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.0 X-Originating-IP: [82.20.18.64] X-Spam: 0 X-Authority: v=2.1 cv=KZcvylsD c=1 sm=1 tr=0 a=tQ56d2wE10i0ATcm3CvKvA==:117 a=tQ56d2wE10i0ATcm3CvKvA==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=NLZqzBF-AAAA:8 a=kj9zAlcOel0A:10 a=q2GGsy2AAAAA:8 a=PsdIZOf_FWlCxrtzr7gA:9 a=CjuIK1q_8ugA:10 a=8gExr0gK3UwA:10 Date: Sun, 24 Jan 2016 15:22:35 +0000 From: Peter Stephenson To: zsh-workers@zsh.org Subject: Re: Glitch with "eval" and "autoload" Message-ID: <20160124152235.5e088b74@ntlworld.com> In-Reply-To: <160123100311.ZM14575@torch.brasslantern.com> References: <160123100311.ZM14575@torch.brasslantern.com> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.28; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Sat, 23 Jan 2016 10:03:11 -0800 Bart Schaefer wrote: > What's the right way to get the actual function name? Climbing up the > fstack looking for strcmp(fsptr->name, "(eval)") != 0 seems pretty ugly, > but the "ineval" global isn't sufficient for e.g. "eval eval autoload -X". You shouldn't need to check the name, rather look for (fstpr->tp == FS_FUNC). That ought to be fairly robust. pws